1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 00:35: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:
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

@ -8,8 +8,8 @@ public:
RandomDevice();
virtual ~RandomDevice() override;
virtual ssize_t read(byte* buffer, size_t bufferSize) override;
virtual ssize_t write(const byte* buffer, size_t bufferSize) override;
virtual ssize_t read(Process&, byte* buffer, size_t bufferSize) override;
virtual ssize_t write(Process&, const byte* buffer, size_t bufferSize) override;
virtual bool can_read(Process&) const override;
virtual bool can_write(Process&) const override { return true; }
};