00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _GPT_H
00012 #define _GPT_H
00013
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017
00018
00019 #define GPT_PART_SOFFSET 0
00020 #define GPT_DOS_TYPE 0xEE
00021
00022
00023
00024
00025 #define GPT_HEAD_OFFSET 1
00026 #define GPT_HEAD_SIG 0x5452415020494645ULL
00027
00028 typedef struct {
00029 uint8_t signature[8];
00030 uint8_t version[4];
00031 uint8_t head_size_b[4];
00032 uint8_t head_crc[4];
00033 uint8_t f1[4];
00034 uint8_t head_lba[8];
00035 uint8_t head2_lba[8];
00036 uint8_t partarea_start[8];
00037 uint8_t partarea_end[8];
00038 uint8_t guid[16];
00039 uint8_t tab_start_lba[8];
00040 uint8_t tab_num_ent[4];
00041 uint8_t tab_size_b[4];
00042 uint8_t tab_crc[4];
00043 uint8_t f2[420];
00044 } gpt_head;
00045
00046
00047
00048 typedef struct {
00049 uint8_t type_guid[16];
00050 uint8_t id_guid[16];
00051 uint8_t start_lba[8];
00052 uint8_t end_lba[8];
00053 uint8_t flags[8];
00054 uint8_t name[72];
00055 } gpt_entry;
00056
00057
00058 #ifdef __cplusplus
00059 }
00060 #endif
00061 #endif