mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 19:05:07 +00:00
BlockDevice -> DiskDevice.
BlockDevice was the wrong name for this abstraction, since a block device is a type of file in a unix system, and we should use that name for that concept in the fs implementation.
This commit is contained in:
parent
72bb80a9ae
commit
9cd0a34b5c
12 changed files with 62 additions and 64 deletions
20
VirtualFileSystem/DiskDevice.h
Normal file
20
VirtualFileSystem/DiskDevice.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Retainable.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
class DiskDevice : public Retainable<DiskDevice> {
|
||||
public:
|
||||
virtual ~DiskDevice();
|
||||
|
||||
virtual unsigned blockSize() const = 0;
|
||||
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;
|
||||
|
||||
protected:
|
||||
DiskDevice();
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue