1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

Partition Table: Add support for Extended partitions

Now also MBR configurations with extended partitions are supported.
This commit is contained in:
Liav A 2020-02-01 23:28:39 +02:00 committed by Andreas Kling
parent 8cde707931
commit 81544dc5b4
6 changed files with 302 additions and 10 deletions

View file

@ -63,6 +63,15 @@ bool MBRPartitionTable::initialize()
return true;
}
bool MBRPartitionTable::contains_ebr() const
{
for (int i = 0; i < 4; i++) {
if (header().entry[i].type == EBR_CHS_CONTAINER || header().entry[i].type == EBR_LBA_CONTAINER)
return true;
}
return false;
}
bool MBRPartitionTable::is_protective_mbr() const
{
return header().entry[0].type == MBR_PROTECTIVE;