1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

Move VFS sources into Kernel/.

This commit is contained in:
Andreas Kling 2019-01-23 05:13:17 +01:00
parent 19104570cc
commit 754037874c
49 changed files with 35 additions and 37 deletions

29
Kernel/NullDevice.cpp Normal file
View file

@ -0,0 +1,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);
}