aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2002-05-31 01:07:13 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2002-05-31 01:07:13 +0000
commit78dff92b6b014e78b6bed92f32007e3437f1dc6d (patch)
tree91e3e16ada3b35d13ddc7d48fbe26b5d706984de
parent806968d6a721cc982fb07ccc861e8a54c01a21db (diff)
Notes
-rw-r--r--sys/sys/gpt.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/sys/gpt.h b/sys/sys/gpt.h
index 95a6cda8c011e..e952534211261 100644
--- a/sys/sys/gpt.h
+++ b/sys/sys/gpt.h
@@ -46,7 +46,14 @@ struct gpt_hdr {
uint32_t hdr_entries;
uint32_t hdr_entsz;
uint32_t hdr_crc_table;
- char padding[]; /* XXX: struct not a multiple of 8. */
+ /*
+ * The header as defined in the EFI spec is not a multiple of 8 bytes
+ * and given that the alignment requirement is on an 8 byte boundary,
+ * padding will happen. We make the padding explicit so that we can
+ * correct the value returned by sizeof() when we put the size of the
+ * header in field hdr_size, or otherwise use offsetof().
+ */
+ uint32_t padding;
};
struct gpt_ent {