mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 16:55: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
|
@ -34,7 +34,7 @@ bool RandomDevice::can_read(Process&) const
|
|||
return true;
|
||||
}
|
||||
|
||||
ssize_t RandomDevice::read(byte* buffer, size_t bufferSize)
|
||||
ssize_t RandomDevice::read(Process&, byte* buffer, size_t bufferSize)
|
||||
{
|
||||
const int range = 'z' - 'a';
|
||||
ssize_t nread = min(bufferSize, GoodBufferSize);
|
||||
|
@ -45,7 +45,7 @@ ssize_t RandomDevice::read(byte* buffer, size_t bufferSize)
|
|||
return nread;
|
||||
}
|
||||
|
||||
ssize_t RandomDevice::write(const byte*, size_t bufferSize)
|
||||
ssize_t RandomDevice::write(Process&, const byte*, size_t bufferSize)
|
||||
{
|
||||
// FIXME: Use input for entropy? I guess that could be a neat feature?
|
||||
return min(GoodBufferSize, bufferSize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue