diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-10-15 00:44:54 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-10-15 00:44:54 +0200 |
commit | 05b088ee2f033120e7f1299a1c7ec123fc3c57c9 (patch) | |
tree | a5cd13a570251766fe0ec6a55a5166e013a40366 /VirtualFileSystem/RandomDevice.h | |
parent | 9528edab9225fc506af7fcffe41ce1f33826a50f (diff) | |
download | serenity-05b088ee2f033120e7f1299a1c7ec123fc3c57c9.zip |
Add a simple /dev/random.
Diffstat (limited to 'VirtualFileSystem/RandomDevice.h')
-rw-r--r-- | VirtualFileSystem/RandomDevice.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/VirtualFileSystem/RandomDevice.h b/VirtualFileSystem/RandomDevice.h new file mode 100644 index 0000000000..4a30c259fc --- /dev/null +++ b/VirtualFileSystem/RandomDevice.h @@ -0,0 +1,13 @@ +#pragma once + +#include "CharacterDevice.h" + +class RandomDevice final : public CharacterDevice { +public: + RandomDevice(); + virtual ~RandomDevice(); + + Unix::ssize_t read(byte* buffer, Unix::size_t bufferSize) override; + Unix::ssize_t write(const byte* buffer, Unix::size_t bufferSize) override; +}; + |