1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:07:35 +00:00

Integrate ext2 from VFS into Kernel.

This commit is contained in:
Andreas Kling 2018-10-17 10:55:43 +02:00
parent aec8ab0a60
commit 9171521752
45 changed files with 662 additions and 1085 deletions

View file

@ -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();