kernel: Fix GPT detection a bit.
commit79363655e5dbc5253ae9b469be3c8c5e27bd15c4
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 18:32:11 +0000 (12 19:32 +0100)
tree1c8c4f503aebae2cbcfae3ea49556c79c6feca7b
parent7252c37c03a7b48ac469f92cfbf508c0f41b672b
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