mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
Create prototype code in GPT.ZC
This commit is contained in:
parent
f37e16e0c3
commit
d7ac08e402
1 changed files with 33 additions and 1 deletions
|
@ -19,7 +19,24 @@ GPT HEADER STRUCTURE:
|
||||||
4 size of single partition entry (usually 0x80 or 128)
|
4 size of single partition entry (usually 0x80 or 128)
|
||||||
4 crc32 of partition entires array in little endian
|
4 crc32 of partition entires array in little endian
|
||||||
?? reserved, zeroes to the end of the block
|
?? 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:
|
GPT PARTITIONS ENTRIES STRUCTURE:
|
||||||
16 partition Type GUID mixed endian
|
16 partition Type GUID mixed endian
|
||||||
16 unique partition GUID mixed endian
|
16 unique partition GUID mixed endian
|
||||||
|
@ -28,6 +45,19 @@ GPT PARTITIONS ENTRIES STRUCTURE:
|
||||||
8 attribute flags
|
8 attribute flags
|
||||||
72 partition name 36 UTF-16LE code units
|
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:
|
GPT Partition attributes:
|
||||||
(bit, details)
|
(bit, details)
|
||||||
0 platform required by computer
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue