kernel: Fix GPT detection a bit.
commitd2ca07ead36fd67bdd2f625a4e005f74777c0c10
authorSascha Wildner <saw@online.de>
Thu, 12 Jan 2017 18:32:11 +0000 (12 19:32 +0100)
committerSascha Wildner <saw@online.de>
Thu, 12 Jan 2017 19:29:08 +0000 (12 20:29 +0100)
tree9f45d9732e153e4e02d237b88d5096e1020819ed
parent5d3fb13649d3235f48767d8f806c040b03781a6f
kernel: Fix GPT detection a bit.

Having a legacy MBR partition of type 0xef aka EFI system
partition is a perfectly legal case, and it is covered by
the UEFI specification too (in version 2.6, see section 12.3.1).

That means it is not a sufficient indicator that this is a
disk with a GPT, so don't automatically treat it as one. For
the partition in the PMBR on actual GPT disks, type 0xee
will always be used, so that check alone is sufficient for
what is intended here.

Background: Using legacy MBR and having an EFI system
partition at the same time is the layout most USB installation
media use in order to boot on both UEFI and legacy BIOS systems.
The upcoming UEFI installation support work will do the same.
sys/kern/subr_diskmbr.c