summaryrefslogtreecommitdiff
path: root/gpt.h
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2009-08-26 00:48:01 -0400
committersrs5694 <srs5694@users.sourceforge.net>2009-08-26 00:48:01 -0400
commit2a9f5da3c3c4ccccd291462bda9d2aefcd485ff8 (patch)
treee328d746064b4d8c19d82644322a60847b0d3c53 /gpt.h
parente19ba095c0c78fbd76a823ed300fada07ad258a9 (diff)
downloadsgdisk-2a9f5da3c3c4ccccd291462bda9d2aefcd485ff8.tar.gz
Added support for big-endian architectures.
New support seems OK so far for me, but I want to test it a bit more before making an official 0.3.5 release....
Diffstat (limited to 'gpt.h')
-rw-r--r--gpt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gpt.h b/gpt.h
index 4c2904e..d5057f6 100644
--- a/gpt.h
+++ b/gpt.h
@@ -12,6 +12,9 @@
#define __GPTSTRUCTS
#define GPT_SIGNATURE UINT64_C(0x5452415020494645)
+// Signatures for Apple (APM) disks, multiplied by 0x100000000
+#define APM_SIGNATURE1 UINT64_C(0x00004D5000000000)
+#define APM_SIGNATURE2 UINT64_C(0x0000535400000000)
/* Number and size of GPT entries... */
#define NUM_GPT_ENTRIES 128
@@ -132,6 +135,8 @@ public:
int SaveGPTBackup(char* filename);
int LoadGPTBackup(char* filename);
int DestroyGPT(void); // Returns 1 if user proceeds
+ void ReverseHeaderBytes(struct GPTHeader* header); // for endianness
+ void ReversePartitionBytes(); // for endianness
// Return data about the GPT structures....
uint32_t GetNumParts(void) {return mainHeader.numParts;}