Pass the process to CharacterDevice::read/write.

This is much nicer than grabbing directly at 'current' inside a read().
This commit is contained in:
Andreas Kling
2019-01-16 00:20:38 +01:00
parent 08bfe518f9
commit bd3e77cc16
27 changed files with 63 additions and 62 deletions

View File

@@ -18,14 +18,14 @@ bool FullDevice::can_read(Process&) const
return true;
}
ssize_t FullDevice::read(byte* buffer, size_t bufferSize)
ssize_t FullDevice::read(Process&, byte* buffer, size_t bufferSize)
{
size_t count = min(GoodBufferSize, bufferSize);
memset(buffer, 0, count);
return count;
}
ssize_t FullDevice::write(const byte*, size_t bufferSize)
ssize_t FullDevice::write(Process&, const byte*, size_t bufferSize)
{
if (bufferSize == 0)
return 0;