blob: 3cc31f5e842257f3a4fb229bc9079fcfedd5d6f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include "NullDevice.h"
#include "Limits.h"
#include <AK/StdLibExtras.h>
#include <AK/kstdio.h>
NullDevice::NullDevice()
: CharacterDevice(1, 3)
{
}
NullDevice::~NullDevice()
{
}
bool NullDevice::can_read(Process&) const
{
return true;
}
ssize_t NullDevice::read(Process&, byte*, size_t)
{
return 0;
}
ssize_t NullDevice::write(Process&, const byte*, size_t bufferSize)
{
return min(GoodBufferSize, bufferSize);
}
|