1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:57:44 +00:00

PartitionTable: Initial GPT Support, Adding Block Limit

Also added a script to handle creation of GPT partitioned disk (with
GRUB config file). Block limit will be used to disallow potential access
to other partitions.
This commit is contained in:
supercomputer7 2019-10-07 03:12:37 +03:00 committed by Andreas Kling
parent b5a043cf42
commit de49714f36
10 changed files with 273 additions and 13 deletions

View file

@ -5,7 +5,7 @@
class DiskPartition final : public DiskDevice {
public:
static NonnullRefPtr<DiskPartition> create(DiskDevice&, unsigned block_offset);
static NonnullRefPtr<DiskPartition> create(DiskDevice&, unsigned block_offset, unsigned block_limit);
virtual ~DiskPartition();
virtual bool read_block(unsigned index, u8* out) const override;
@ -22,8 +22,9 @@ public:
private:
virtual const char* class_name() const override;
DiskPartition(DiskDevice&, unsigned block_offset);
DiskPartition(DiskDevice&, unsigned block_offset, unsigned block_limit);
NonnullRefPtr<DiskDevice> m_device;
unsigned m_block_offset;
unsigned m_block_limit;
};