mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +00:00
Kernel: Merge unnecessary DiskDevice class into BlockDevice
This commit is contained in:
parent
6be880bd10
commit
88ea152b24
27 changed files with 98 additions and 212 deletions
|
@ -35,6 +35,14 @@ public:
|
|||
size_t block_size() const { return m_block_size; }
|
||||
virtual bool is_seekable() const override { return true; }
|
||||
|
||||
bool read_block(unsigned index, u8*) const;
|
||||
bool write_block(unsigned index, const u8*);
|
||||
bool read_raw(u32 offset, unsigned length, u8*) const;
|
||||
bool write_raw(u32 offset, unsigned length, const u8*);
|
||||
|
||||
virtual bool read_blocks(unsigned index, u16 count, u8*) = 0;
|
||||
virtual bool write_blocks(unsigned index, u16 count, const u8*) = 0;
|
||||
|
||||
protected:
|
||||
BlockDevice(unsigned major, unsigned minor, size_t block_size = PAGE_SIZE)
|
||||
: Device(major, minor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue