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
commit 81544dc5b4
Notes: sideshowbarker 2024-07-19 09:43:08 +09:00
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;