Make spoofed disklabel boundstart and boundend default to the bounds
authorkrw <krw@openbsd.org>
Tue, 1 Jun 2021 22:54:43 +0000 (22:54 +0000)
committerkrw <krw@openbsd.org>
Tue, 1 Jun 2021 22:54:43 +0000 (22:54 +0000)
commitba6b8b61ba44d8e2d6cfe29447a1054c2cc7f280
tree75b86a08116782585dedc3071cb4d698b4e36550
parent9f1181d59de355abd911a3e0ab234c28078875ed
Make spoofed disklabel boundstart and boundend default to the bounds
of the usable LBA range defined by the GPT header. And then shrink
them to the bounds of the first OpenBSD partition if one is found.

While here simplify the logic, eliminate some superfluous variables
and reduce use of magic numbers.

Improvement suggested by sobrado@ ok kettenis@
sys/kern/subr_disk.c