From 05b088ee2f033120e7f1299a1c7ec123fc3c57c9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 15 Oct 2018 00:44:54 +0200 Subject: Add a simple /dev/random. --- VirtualFileSystem/RandomDevice.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 VirtualFileSystem/RandomDevice.h (limited to 'VirtualFileSystem/RandomDevice.h') 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; +}; + -- cgit v1.2.3