aboutsummaryrefslogtreecommitdiff
path: root/src/gpt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpt.h')
-rw-r--r--src/gpt.h40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/gpt.h b/src/gpt.h
index 79b5b8c..fe37ca8 100644
--- a/src/gpt.h
+++ b/src/gpt.h
@@ -18,6 +18,8 @@
#ifndef _GPT_H_
#define _GPT_H_
+#include <stdint.h>
+
/*
* Values
*/
@@ -39,28 +41,28 @@
struct gpt_header {
char signature[8];
- unsigned int version;
- unsigned int size;
- unsigned int crc;
- unsigned int reserved;
- unsigned long long current_lba;
- unsigned long long backup_lba;
- unsigned long long first_lba;
- unsigned long long last_lba;
- unsigned char guid[16];
- unsigned long long partitions_lba;
- unsigned int partitions_count;
- unsigned int partitions_size;
- unsigned int partitions_crc;
+ uint32_t version;
+ uint32_t size;
+ uint32_t crc;
+ uint32_t reserved;
+ uint64_t current_lba;
+ uint64_t backup_lba;
+ uint64_t first_lba;
+ uint64_t last_lba;
+ uint8_t guid[16];
+ uint64_t partitions_lba;
+ uint32_t partitions_count;
+ uint32_t partitions_size;
+ uint32_t partitions_crc;
} __attribute__((__packed__));
struct gpt_partition {
- unsigned char type_guid[16];
- unsigned char guid[16];
- unsigned long long first_lba;
- unsigned long long last_lba;
- unsigned long long flags;
- short name[GPT_PARTITION_NAME_COUNT];
+ uint8_t type_guid[16];
+ uint8_t guid[16];
+ uint64_t first_lba;
+ uint64_t last_lba;
+ uint64_t flags;
+ int16_t name[GPT_PARTITION_NAME_COUNT];
} __attribute__((__packed__));
/*