summaryrefslogtreecommitdiff
path: root/basicmbr.h
diff options
context:
space:
mode:
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2018-05-18 23:44:40 +0200
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2018-05-18 23:44:40 +0200
commit2fb79510f0452e91b72cefa704268a569b9885e9 (patch)
tree0d5bab9cd0e903fe768976a8248c29f2f20c3975 /basicmbr.h
parent5e490b279f313bf2138d99a12f3fbed299d4ac2e (diff)
downloadsgdisk-2fb79510f0452e91b72cefa704268a569b9885e9.tar.gz
Reset struct alignment back to standard after each #pragma pack (n)
When using #pragma pack (n) to change the alignment for a struct to n bytes, it is necessary to reset the alignment to the standard value as otherwise the changed alignment is used throughout the whole program code which causes other structs to become unaligned.
Diffstat (limited to 'basicmbr.h')
-rw-r--r--basicmbr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/basicmbr.h b/basicmbr.h
index b809856..21f962e 100644
--- a/basicmbr.h
+++ b/basicmbr.h
@@ -34,6 +34,7 @@ struct TempMBR {
struct MBRRecord partitions[4];
uint16_t MBRSignature;
}; // struct TempMBR
+#pragma pack ()
// Possible states of the MBR
enum MBRValidity {invalid, gpt, hybrid, mbr};