debug("%s: gpt-entry at %p\n", __func__, gpt_pte);
printf("Part\tStart LBA\tEnd LBA\t\tName\n");
+ printf("\tAttributes\n");
printf("\tType UUID\n");
printf("\tPartition UUID\n");
le64_to_int(gpt_pte[i].starting_lba),
le64_to_int(gpt_pte[i].ending_lba),
print_efiname(&gpt_pte[i]));
+ printf("\tattrs:\t0x%016llx\n", gpt_pte[i].attributes.raw);
uuid_string(gpt_pte[i].partition_type_guid.b, uuid);
printf("\ttype:\t%s\n", uuid);
uuid_string(gpt_pte[i].unique_partition_guid.b, uuid);
unsigned char reserved2[GPT_BLOCK_SIZE - 92];
} __attribute__ ((packed)) gpt_header;
-typedef struct _gpt_entry_attributes {
- unsigned long long required_to_function:1;
- unsigned long long no_block_io_protocol:1;
- unsigned long long legacy_bios_bootable:1;
- unsigned long long reserved:45;
- unsigned long long type_guid_specific:16;
+typedef union _gpt_entry_attributes {
+ struct {
+ unsigned long long required_to_function:1;
+ unsigned long long no_block_io_protocol:1;
+ unsigned long long legacy_bios_bootable:1;
+ unsigned long long reserved:45;
+ unsigned long long type_guid_specific:16;
+ } fields;
+ unsigned long long raw;
} __attribute__ ((packed)) gpt_entry_attributes;
#define PARTNAME_SZ (72 / sizeof(efi_char16_t))