diff --git a/src/Home/GPT.ZC b/src/Home/GPT.ZC index e13a7cce..2c8d97f9 100644 --- a/src/Home/GPT.ZC +++ b/src/Home/GPT.ZC @@ -19,7 +19,24 @@ GPT HEADER STRUCTURE: 4 size of single partition entry (usually 0x80 or 128) 4 crc32 of partition entires array in little endian ?? reserved, zeroes to the end of the block +*/ +class GPTHeader +{ + U8 signature, + revnum_headsize, + crc32head_reszero, + lba_copy_current, + lba_copy_backup, + lba_usable_first, + lba_usable_last; + U16 disk_guid; + U8 lba_start_partitions, + entrynum_singlesize, + crc32entries_reszero; +}; + +/* GPT PARTITIONS ENTRIES STRUCTURE: 16 partition Type GUID mixed endian 16 unique partition GUID mixed endian @@ -28,6 +45,19 @@ GPT PARTITIONS ENTRIES STRUCTURE: 8 attribute flags 72 partition name 36 UTF-16LE code units +*/ + +class GPTPartitionHeader +{ + U16 guid_type, + guid_unique; + U8 lba_first, + lba_last, + attr_flags; + U8 name[72]; +}; +/* + GPT Partition attributes: (bit, details) 0 platform required by computer @@ -38,5 +68,7 @@ GPT Partition attributes: **/ - +#define GPT_PARTf_REQ 0 +#define GPT_PARTf_EFI 1 +#define GPT_PARTf_LEGACY 2