diff options
author | Alexis211 <alexis211@gmail.com> | 2009-08-31 21:44:26 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-08-31 21:44:26 +0200 |
commit | df76b24fed5ac3b5af406aad3df277d7f4c347e5 (patch) | |
tree | ea8a0ca4856cce9da63c047eff6e72a58c643159 /Source/Kernel/VFS/Partition.class.h | |
parent | 6bf215215e1ebaa9613b51500031e6963c12d33b (diff) | |
download | Melon-df76b24fed5ac3b5af406aad3df277d7f4c347e5.tar.gz Melon-df76b24fed5ac3b5af406aad3df277d7f4c347e5.zip |
Now we can read frop floppy drives !!! Next : FAT driver.
Diffstat (limited to 'Source/Kernel/VFS/Partition.class.h')
-rw-r--r-- | Source/Kernel/VFS/Partition.class.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/Kernel/VFS/Partition.class.h b/Source/Kernel/VFS/Partition.class.h new file mode 100644 index 0000000..e9087bf --- /dev/null +++ b/Source/Kernel/VFS/Partition.class.h @@ -0,0 +1,28 @@ +#ifndef DEF_PARTITION_CLASS_H +#define DEF_PARTITION_CLASS_H + +#include <Devices/BlockDevice.proto.h> + +class Partition { + private: + BlockDevice* m_device; + u64int m_startblock, m_blockcount; + u8int m_partnumber; //Partition number in partition table of device + + public: + Partition(BlockDevice* dev, u8int partnumber, u64int startblock, u64int blockcount); + + bool readBlocks(u64int startblock, u32int count, u8int *data); + bool writeBlocks(u64int startblock, u32int count, u8int *data); + + //Accessors : + BlockDevice* getDevice(); + u64int getStartBlock(); + u64int getBlockCount(); + u8int getPartNumber(); + u32int getBlockSize(); + inline u64int blocks() { return getBlockCount(); } +}; + +#endif + |