summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2015-05-13 14:05:53 +0000
committerae <ae@FreeBSD.org>2015-05-13 14:05:53 +0000
commit8e1b135fb3cb1e2b110d4b33750944465e5146a5 (patch)
tree6f90b39349723b08fd51addfb482396f5671af67
parent807e2f21fd8580eb45719c1e74d4f69cb83c799f (diff)
downloadFreeBSD-src-8e1b135fb3cb1e2b110d4b33750944465e5146a5.zip
FreeBSD-src-8e1b135fb3cb1e2b110d4b33750944465e5146a5.tar.gz
MFC r282465:
Add apple-boot, apple-hfs and apple-ufs aliases to MBR scheme. Sort DOSPTYP_* entries in diskmbr.h by value. Document these scheme-specific types in gpart(8).
-rw-r--r--sbin/geom/class/part/gpart.86
-rw-r--r--sys/geom/part/g_part_mbr.c3
-rw-r--r--sys/sys/diskmbr.h6
3 files changed, 12 insertions, 3 deletions
diff --git a/sbin/geom/class/part/gpart.8 b/sbin/geom/class/part/gpart.8
index 98e8bfd..11ad201 100644
--- a/sbin/geom/class/part/gpart.8
+++ b/sbin/geom/class/part/gpart.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 12, 2015
+.Dd May 5, 2015
.Dt GPART 8
.Os
.Sh NAME
@@ -668,6 +668,8 @@ for GPT.
.It Cm apple-hfs
An Apple Mac OS X partition that contains a HFS or HFS+ filesystem.
The scheme-specific types are
+.Qq Li "!175"
+for MBR,
.Qq Li "!Apple_HFS"
for APM and
.Qq Li "!48465300-0000-11aa-aa11-00306543ecac"
@@ -696,6 +698,8 @@ for GPT.
.It Cm apple-ufs
An Apple Mac OS X partition that contains a UFS filesystem.
The scheme-specific types are
+.Qq Li "!168"
+for MBR,
.Qq Li "!Apple_UNIX_SVR2"
for APM and
.Qq Li "!55465300-0000-11aa-aa11-00306543ecac"
diff --git a/sys/geom/part/g_part_mbr.c b/sys/geom/part/g_part_mbr.c
index 8b32778..5a4a48b 100644
--- a/sys/geom/part/g_part_mbr.c
+++ b/sys/geom/part/g_part_mbr.c
@@ -138,6 +138,9 @@ static struct g_part_mbr_alias {
{ DOSPTYP_PPCBOOT, G_PART_ALIAS_PREP_BOOT },
{ DOSPTYP_VMFS, G_PART_ALIAS_VMFS },
{ DOSPTYP_VMKDIAG, G_PART_ALIAS_VMKDIAG },
+ { DOSPTYP_APPLE_UFS, G_PART_ALIAS_APPLE_UFS },
+ { DOSPTYP_APPLE_BOOT, G_PART_ALIAS_APPLE_BOOT },
+ { DOSPTYP_HFS, G_PART_ALIAS_APPLE_HFS },
};
static int
diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h
index c92364d..cfbbdcb 100644
--- a/sys/sys/diskmbr.h
+++ b/sys/sys/diskmbr.h
@@ -51,11 +51,13 @@
#define DOSPTYP_EXTLBA 0x0f /* DOS extended partition */
#define DOSPTYP_PPCBOOT 0x41 /* PReP/CHRP boot partition */
#define DOSPTYP_LDM 0x42 /* Win2k dynamic extended partition */
-#define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */
-#define DOSPTYP_HFS 0xaf /* HFS/HFS+ partition type */
#define DOSPTYP_LINSWP 0x82 /* Linux swap partition */
#define DOSPTYP_LINUX 0x83 /* Linux partition */
#define DOSPTYP_LINLVM 0x8e /* Linux LVM partition */
+#define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */
+#define DOSPTYP_APPLE_UFS 0xa8 /* Apple Mac OS X boot */
+#define DOSPTYP_APPLE_BOOT 0xab /* Apple Mac OS X UFS */
+#define DOSPTYP_HFS 0xaf /* HFS/HFS+ partition type */
#define DOSPTYP_PMBR 0xee /* GPT Protective MBR */
#define DOSPTYP_VMFS 0xfb /* VMware VMFS partition */
#define DOSPTYP_VMKDIAG 0xfc /* VMware vmkDiagnostic partition */
OpenPOWER on IntegriCloud