mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:22:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			429 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			429 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <Kernel/Devices/Device.h>
 | |
| #include <Kernel/LinearAddress.h>
 | |
| 
 | |
| class BlockDevice : public Device {
 | |
| public:
 | |
|     virtual ~BlockDevice() override;
 | |
| 
 | |
|     virtual Region* mmap(Process&, LinearAddress preferred_laddr, size_t offset, size_t size) = 0;
 | |
| 
 | |
| protected:
 | |
|     BlockDevice(unsigned major, unsigned minor) : Device(major, minor) { }
 | |
| 
 | |
| private:
 | |
|     virtual bool is_block_device() const final { return true; }
 | |
| };
 | 
