mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
Rework DiskDevice's read() and write() to be non-virtual wrappers.
This way subclasses only have to implement readBlock() and writeBlock(). read() and write() require that the offset and length are both divisible by the blockSize().
This commit is contained in:
parent
cafb5b2ad6
commit
8293a0ff36
5 changed files with 47 additions and 10 deletions
|
@ -11,8 +11,8 @@ public:
|
|||
virtual bool readBlock(unsigned index, byte*) const = 0;
|
||||
virtual bool writeBlock(unsigned index, const byte*) = 0;
|
||||
virtual const char* className() const = 0;
|
||||
virtual bool read(qword offset, unsigned length, byte*) const = 0;
|
||||
virtual bool write(qword offset, unsigned length, const byte*) = 0;
|
||||
bool read(qword offset, unsigned length, byte*) const;
|
||||
bool write(qword offset, unsigned length, const byte*);
|
||||
|
||||
protected:
|
||||
DiskDevice();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue