From 76db6c87731fcab1318c212f118e575eb3d4808b Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Sun, 17 Jun 2018 20:10:48 +0000 Subject: [PATCH] gpart: add EFI alias for MBR partition scheme Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15870 --- sbin/geom/class/part/gpart.8 | 10 ++++++---- sys/geom/part/g_part_ebr.c | 1 + sys/geom/part/g_part_mbr.c | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sbin/geom/class/part/gpart.8 b/sbin/geom/class/part/gpart.8 index db4b8dd1de6..829181578e8 100644 --- a/sbin/geom/class/part/gpart.8 +++ b/sbin/geom/class/part/gpart.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 11, 2018 +.Dd June 17, 2018 .Dt GPART 8 .Os .Sh NAME @@ -630,9 +630,11 @@ The scheme-specific type is .It Cm efi The system partition for computers that use the Extensible Firmware Interface (EFI). -In such cases, the GPT partitioning scheme is used and the -actual partition type for the system partition can also be specified as -.Qq Li "!c12a7328-f81f-11d2-ba4b-00a0c93ec93b" . +The scheme-specific types are +.Qq Li "!239" +for MBR, and +.Qq Li "!c12a7328-f81f-11d2-ba4b-00a0c93ec93b" +for GPT. .It Cm freebsd A .Fx diff --git a/sys/geom/part/g_part_ebr.c b/sys/geom/part/g_part_ebr.c index dc8f7fc3cf9..40f852c6ddb 100644 --- a/sys/geom/part/g_part_ebr.c +++ b/sys/geom/part/g_part_ebr.c @@ -135,6 +135,7 @@ static struct g_part_ebr_alias { int alias; } ebr_alias_match[] = { { DOSPTYP_386BSD, G_PART_ALIAS_FREEBSD }, + { DOSPTYP_EFI, G_PART_ALIAS_EFI }, { DOSPTYP_FAT32, G_PART_ALIAS_MS_FAT32 }, { DOSPTYP_FAT32LBA, G_PART_ALIAS_MS_FAT32LBA }, { DOSPTYP_LINLVM, G_PART_ALIAS_LINUX_LVM }, diff --git a/sys/geom/part/g_part_mbr.c b/sys/geom/part/g_part_mbr.c index f3a2d034063..8b4da964367 100644 --- a/sys/geom/part/g_part_mbr.c +++ b/sys/geom/part/g_part_mbr.c @@ -130,6 +130,7 @@ static struct g_part_mbr_alias { { DOSPTYP_386BSD, G_PART_ALIAS_FREEBSD }, { DOSPTYP_APPLE_BOOT, G_PART_ALIAS_APPLE_BOOT }, { DOSPTYP_APPLE_UFS, G_PART_ALIAS_APPLE_UFS }, + { DOSPTYP_EFI, G_PART_ALIAS_EFI }, { DOSPTYP_EXT, G_PART_ALIAS_EBR }, { DOSPTYP_EXTLBA, G_PART_ALIAS_EBR }, { DOSPTYP_FAT16, G_PART_ALIAS_MS_FAT16 },