summaryrefslogtreecommitdiff
path: root/Kernel/RandomDevice.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-23 05:13:17 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-23 05:14:00 +0100
commit754037874c692769c703f86bfa7af641e1346139 (patch)
treed88a26977532a288eed2f61ef61526931713fa4f /Kernel/RandomDevice.h
parent19104570cc286b608f6f8c22002ed4a8965b4648 (diff)
downloadserenity-754037874c692769c703f86bfa7af641e1346139.zip
Move VFS sources into Kernel/.
Diffstat (limited to 'Kernel/RandomDevice.h')
-rw-r--r--Kernel/RandomDevice.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/Kernel/RandomDevice.h b/Kernel/RandomDevice.h
new file mode 100644
index 0000000000..defaebff9d
--- /dev/null
+++ b/Kernel/RandomDevice.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "CharacterDevice.h"
+
+class RandomDevice final : public CharacterDevice {
+ AK_MAKE_ETERNAL
+public:
+ RandomDevice();
+ virtual ~RandomDevice() override;
+
+private:
+ // ^CharacterDevice
+ 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; }
+ virtual const char* class_name() const override { return "RandomDevice"; }
+};
+