git: kernel: Fix GPT detection a bit.

Sascha Wildner swildner at crater.dragonflybsd.org
Thu Jan 12 10:43:58 PST 2017


commit 79363655e5dbc5253ae9b469be3c8c5e27bd15c4
Author: Sascha Wildner <saw at online.de>
Date:   Thu Jan 12 19:32:11 2017 +0100

    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.

Summary of changes:
 sys/kern/subr_diskmbr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/79363655e5dbc5253ae9b469be3c8c5e27bd15c4


-- 
DragonFly BSD source repository



More information about the Commits mailing list