mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 20:25:08 +00:00
Pass the process to CharacterDevice::read/write.
This is much nicer than grabbing directly at 'current' inside a read().
This commit is contained in:
parent
08bfe518f9
commit
bd3e77cc16
27 changed files with 63 additions and 62 deletions
|
@ -17,14 +17,14 @@ bool ZeroDevice::can_read(Process&) const
|
|||
return true;
|
||||
}
|
||||
|
||||
ssize_t ZeroDevice::read(byte* buffer, size_t bufferSize)
|
||||
ssize_t ZeroDevice::read(Process&, byte* buffer, size_t bufferSize)
|
||||
{
|
||||
size_t count = min(GoodBufferSize, bufferSize);
|
||||
memset(buffer, 0, count);
|
||||
return count;
|
||||
}
|
||||
|
||||
ssize_t ZeroDevice::write(const byte*, size_t bufferSize)
|
||||
ssize_t ZeroDevice::write(Process&, const byte*, size_t bufferSize)
|
||||
{
|
||||
return min(GoodBufferSize, bufferSize);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue