1
Fork 0
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:
Andreas Kling 2018-10-16 11:21:49 +02:00
parent 72bb80a9ae
commit 9cd0a34b5c
12 changed files with 62 additions and 64 deletions

View 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();
};