summaryrefslogtreecommitdiff
path: root/VirtualFileSystem/RandomDevice.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-15 00:44:54 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-15 00:44:54 +0200
commit05b088ee2f033120e7f1299a1c7ec123fc3c57c9 (patch)
treea5cd13a570251766fe0ec6a55a5166e013a40366 /VirtualFileSystem/RandomDevice.h
parent9528edab9225fc506af7fcffe41ce1f33826a50f (diff)
downloadserenity-05b088ee2f033120e7f1299a1c7ec123fc3c57c9.zip
Add a simple /dev/random.
Diffstat (limited to 'VirtualFileSystem/RandomDevice.h')
-rw-r--r--VirtualFileSystem/RandomDevice.h13
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;
+};
+