diff options
author | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2018-05-18 23:44:40 +0200 |
---|---|---|
committer | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2018-05-18 23:44:40 +0200 |
commit | 2fb79510f0452e91b72cefa704268a569b9885e9 (patch) | |
tree | 0d5bab9cd0e903fe768976a8248c29f2f20c3975 /basicmbr.h | |
parent | 5e490b279f313bf2138d99a12f3fbed299d4ac2e (diff) | |
download | sgdisk-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.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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}; |