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:
parent
50965a6892
commit
fd8706be29
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user