gpart: More nuance for GPT support
A careful reading of the GPT standard shows that one may have fewer than
128 entries in your GPT table. While the standard requires that we
reserve enough space (32 512-byte-LBAs or 4 4096-byte-LBAs), it also
explicitly allows one to specify fewer actual partitions (since that
controls what is in the CRC). It requires that the first LBA to be 32
(512 sectors) or 6 (4k sectors) or larger. That requirement is not
enforced (it's not listed as one of validation criteria for the GPT).
We should likely do so in the future.
To that end, allow a default number of entries to use (defent) on
creation to be different (larger) than the minimum number of legal
entries. For gpt, these numbers work out to 128 and 1 respectively. For
all the others, make minent == defent so this is a nop for those
partitioning schemes.
Sponsored by: Netflix
Reviewed by: zlei, emaste
Differential Revision: https://reviews.freebsd.org/D42246