1515 */
1616#pragma once
1717
18- #include < cstdint >
18+ #include < stdint.h >
1919
2020#include " cuttlefish/common/libs/utils/size_utils.h"
2121#include " cuttlefish/host/libs/image_aggregator/mbr.h"
@@ -25,41 +25,41 @@ namespace cuttlefish {
2525constexpr int GPT_NUM_PARTITIONS = 128 ;
2626
2727struct __attribute__ ((packed)) GptHeader {
28- std:: uint8_t signature[8 ];
29- std:: uint8_t revision[4 ];
30- std:: uint32_t header_size;
31- std:: uint32_t header_crc32;
32- std:: uint32_t reserved;
33- std:: uint64_t current_lba;
34- std:: uint64_t backup_lba;
35- std:: uint64_t first_usable_lba;
36- std:: uint64_t last_usable_lba;
37- std:: uint8_t disk_guid[16 ];
38- std:: uint64_t partition_entries_lba;
39- std:: uint32_t num_partition_entries;
40- std:: uint32_t partition_entry_size;
41- std:: uint32_t partition_entries_crc32;
28+ uint8_t signature[8 ];
29+ uint8_t revision[4 ];
30+ uint32_t header_size;
31+ uint32_t header_crc32;
32+ uint32_t reserved;
33+ uint64_t current_lba;
34+ uint64_t backup_lba;
35+ uint64_t first_usable_lba;
36+ uint64_t last_usable_lba;
37+ uint8_t disk_guid[16 ];
38+ uint64_t partition_entries_lba;
39+ uint32_t num_partition_entries;
40+ uint32_t partition_entry_size;
41+ uint32_t partition_entries_crc32;
4242};
4343
4444static_assert (sizeof (GptHeader) == 92 );
4545
4646struct __attribute__ ((packed)) GptPartitionEntry {
47- std:: uint8_t partition_type_guid[16 ];
48- std:: uint8_t unique_partition_guid[16 ];
49- std:: uint64_t first_lba;
50- std:: uint64_t last_lba;
51- std:: uint64_t attributes;
52- std:: uint16_t partition_name[36 ]; // UTF-16LE
47+ uint8_t partition_type_guid[16 ];
48+ uint8_t unique_partition_guid[16 ];
49+ uint64_t first_lba;
50+ uint64_t last_lba;
51+ uint64_t attributes;
52+ uint16_t partition_name[36 ]; // UTF-16LE
5353};
5454
5555static_assert (sizeof (GptPartitionEntry) == 128 );
5656
5757struct __attribute__ ((packed)) GptBeginning {
5858 MasterBootRecord protective_mbr;
5959 GptHeader header;
60- std:: uint8_t header_padding[kSectorSize - sizeof (GptHeader)];
60+ uint8_t header_padding[kSectorSize - sizeof (GptHeader)];
6161 GptPartitionEntry entries[GPT_NUM_PARTITIONS];
62- std:: uint8_t partition_alignment[3072 ];
62+ uint8_t partition_alignment[3072 ];
6363};
6464
6565static_assert (AlignToPowerOf2(sizeof (GptBeginning), PARTITION_SIZE_SHIFT) ==
@@ -68,7 +68,7 @@ static_assert(AlignToPowerOf2(sizeof(GptBeginning), PARTITION_SIZE_SHIFT) ==
6868struct __attribute__ ((packed)) GptEnd {
6969 GptPartitionEntry entries[GPT_NUM_PARTITIONS];
7070 GptHeader footer;
71- std:: uint8_t footer_padding[kSectorSize - sizeof (GptHeader)];
71+ uint8_t footer_padding[kSectorSize - sizeof (GptHeader)];
7272};
7373
7474static_assert (sizeof (GptEnd) % kSectorSize == 0 );
0 commit comments