mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:52:44 +00:00 
			
		
		
		
	Add a simple /dev/random.
This commit is contained in:
		
							parent
							
								
									9528edab92
								
							
						
					
					
						commit
						05b088ee2f
					
				
					 5 changed files with 65 additions and 1 deletions
				
			
		
							
								
								
									
										13
									
								
								VirtualFileSystem/RandomDevice.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								VirtualFileSystem/RandomDevice.h
									
										
									
									
									
										Normal 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; | ||||
| }; | ||||
| 
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling