2018-10-14 03:59:22 +03:00
|
|
|
#include "NullDevice.h"
|
|
|
|
#include "Limits.h"
|
|
|
|
#include <AK/StdLib.h>
|
2018-10-16 15:33:16 +03:00
|
|
|
#include <AK/kstdio.h>
|
2018-10-14 03:59:22 +03:00
|
|
|
|
|
|
|
NullDevice::NullDevice()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
NullDevice::~NullDevice()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-10-14 23:57:41 +03:00
|
|
|
Unix::ssize_t NullDevice::read(byte*, Unix::size_t)
|
2018-10-14 03:59:22 +03:00
|
|
|
{
|
2018-10-16 15:33:16 +03:00
|
|
|
kprintf("NullDevice: read from null\n");
|
2018-10-14 03:59:22 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-10-14 23:57:41 +03:00
|
|
|
Unix::ssize_t NullDevice::write(const byte*, Unix::size_t bufferSize)
|
2018-10-14 03:59:22 +03:00
|
|
|
{
|
|
|
|
return min(GoodBufferSize, bufferSize);
|
|
|
|
}
|
|
|
|
|