1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00

Add a simple /dev/random.

This commit is contained in:
Andreas Kling 2018-10-15 00:44:54 +02:00
parent 9528edab92
commit 05b088ee2f
5 changed files with 65 additions and 1 deletions

View file

@ -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;
};