Add compile time asserts for the size of struct gpt_hdr and struct

gpt_ent. Use offsetof() for struct gpt_hdr to exclude padding.
This commit is contained in:
Marcel Moolenaar 2002-05-30 06:33:07 +00:00
parent 50965a6892
commit fd8706be29

View File

@ -57,6 +57,9 @@
#include <geom/geom.h>
#include <geom/geom_slice.h>
CTASSERT(offsetof(struct gpt_hdr, padding) == 92);
CTASSERT(sizeof(struct gpt_ent) == 128);
/*
* XXX: GEOM is not dynamic enough. We are forced to use a compile-time
* limit. The minimum number of partitions (128) as required by EFI is