Use the same logic in all copies of gpt_chk_mbr(), relaxing the
authorkrw <krw@openbsd.org>
Wed, 2 Jun 2021 22:44:26 +0000 (22:44 +0000)
committerkrw <krw@openbsd.org>
Wed, 2 Jun 2021 22:44:26 +0000 (22:44 +0000)
commit71c0bb0b4bae49e4bfb4827f265e2b4c30bf092a
tree09607934cebd7d1172fca33e1da6663a1626e74c
parent3cc9bc2c41c589c0483bd3971e1890d376506495
Use the same logic in all copies of gpt_chk_mbr(), relaxing the
media length check to allow EFI GPT partitions to be smaller that
the entire disk.

Consistently use GPTSECTOR instead of randomly tossing in some
literal '1's.

ok kettenis@
sbin/fdisk/mbr.c
sys/arch/amd64/stand/efiboot/efidev.c
sys/arch/amd64/stand/libsa/softraid_amd64.c
sys/arch/arm64/stand/efiboot/efidev.c
sys/arch/arm64/stand/efiboot/softraid_arm64.c
sys/arch/armv7/stand/efiboot/efidev.c
sys/arch/riscv64/stand/efiboot/efidev.c
sys/arch/riscv64/stand/efiboot/softraid_riscv64.c
sys/kern/subr_disk.c
usr.sbin/installboot/armv7_installboot.c
usr.sbin/installboot/i386_installboot.c