mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
Integrate ext2 from VFS into Kernel.
This commit is contained in:
parent
aec8ab0a60
commit
9171521752
45 changed files with 662 additions and 1085 deletions
|
@ -3,6 +3,13 @@
|
|||
#include <AK/Retainable.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
#ifdef SERENITY_KERNEL
|
||||
// FIXME: Support 64-bit DiskOffset
|
||||
typedef dword DiskOffset;
|
||||
#else
|
||||
typedef qword DiskOffset;
|
||||
#endif
|
||||
|
||||
class DiskDevice : public Retainable<DiskDevice> {
|
||||
public:
|
||||
virtual ~DiskDevice();
|
||||
|
@ -11,8 +18,8 @@ public:
|
|||
virtual bool readBlock(unsigned index, byte*) const = 0;
|
||||
virtual bool writeBlock(unsigned index, const byte*) = 0;
|
||||
virtual const char* className() const = 0;
|
||||
bool read(qword offset, unsigned length, byte*) const;
|
||||
bool write(qword offset, unsigned length, const byte*);
|
||||
bool read(DiskOffset, unsigned length, byte*) const;
|
||||
bool write(DiskOffset, unsigned length, const byte*);
|
||||
|
||||
protected:
|
||||
DiskDevice();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue