diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-23 05:13:17 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-23 05:14:00 +0100 |
commit | 754037874c692769c703f86bfa7af641e1346139 (patch) | |
tree | d88a26977532a288eed2f61ef61526931713fa4f /Kernel/DiskDevice.h | |
parent | 19104570cc286b608f6f8c22002ed4a8965b4648 (diff) | |
download | serenity-754037874c692769c703f86bfa7af641e1346139.zip |
Move VFS sources into Kernel/.
Diffstat (limited to 'Kernel/DiskDevice.h')
-rw-r--r-- | Kernel/DiskDevice.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Kernel/DiskDevice.h b/Kernel/DiskDevice.h new file mode 100644 index 0000000000..071c5cd63b --- /dev/null +++ b/Kernel/DiskDevice.h @@ -0,0 +1,23 @@ +#pragma once + +#include <AK/Retainable.h> +#include <AK/Types.h> + +// FIXME: Support 64-bit DiskOffset +typedef dword DiskOffset; + +class DiskDevice : public Retainable<DiskDevice> { +public: + virtual ~DiskDevice(); + + virtual unsigned block_size() const = 0; + virtual bool read_block(unsigned index, byte*) const = 0; + virtual bool write_block(unsigned index, const byte*) = 0; + virtual const char* class_name() const = 0; + bool read(DiskOffset, unsigned length, byte*) const; + bool write(DiskOffset, unsigned length, const byte*); + +protected: + DiskDevice(); +}; + |