mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:47:37 +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:
parent
b5a043cf42
commit
de49714f36
10 changed files with 273 additions and 13 deletions
|
@ -2,15 +2,16 @@
|
|||
|
||||
// #define OFFD_DEBUG
|
||||
|
||||
NonnullRefPtr<DiskPartition> DiskPartition::create(DiskDevice& device, unsigned block_offset)
|
||||
NonnullRefPtr<DiskPartition> DiskPartition::create(DiskDevice& device, unsigned block_offset, unsigned block_limit)
|
||||
{
|
||||
return adopt(*new DiskPartition(device, block_offset));
|
||||
return adopt(*new DiskPartition(device, block_offset, block_limit));
|
||||
}
|
||||
|
||||
DiskPartition::DiskPartition(DiskDevice& device, unsigned block_offset)
|
||||
DiskPartition::DiskPartition(DiskDevice& device, unsigned block_offset, unsigned block_limit)
|
||||
: DiskDevice(100, 0, device.block_size())
|
||||
, m_device(device)
|
||||
, m_block_offset(block_offset)
|
||||
, m_block_limit(block_limit)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue