Tweak the two copies of gpt_chk_mbr() to return the index of the MBR
authorkrw <krw@openbsd.org>
Fri, 14 May 2021 15:31:01 +0000 (15:31 +0000)
committerkrw <krw@openbsd.org>
Fri, 14 May 2021 15:31:01 +0000 (15:31 +0000)
commit17eb2d2cf329a5c5d84377ceb5d54a0f9bf2a38b
tree4ca36e2fa8fcb45a7a48da9203e756f7dfea3520
parent7198c5f253820463a39b1bddb779c2e27b7abc47
Tweak the two copies of gpt_chk_mbr() to return the index of the MBR
0xEE (DOSPTYP_EFI) partition, or -1 no usable such partition is found.

Adopt a consistent idiom to capture the index for future use.

Clean up the gpt_chk_mbr() logic to make it clearer what constraints
are being applied when looking for the DOSTYP_EFI partition.

No intentional functional change.
sbin/fdisk/cmd.c
sbin/fdisk/fdisk.c
sbin/fdisk/mbr.c
sbin/fdisk/user.c
sys/kern/subr_disk.c