Date: Sun, 11 Feb 2018 06:57:20 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329119 - in head: sbin/geom/class/part sys/geom/part sys/sys/disk Message-ID: <201802110657.w1B6vKvT024572@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Sun Feb 11 06:57:20 2018 New Revision: 329119 URL: https://svnweb.freebsd.org/changeset/base/329119 Log: Add GUID and alias for Apple APFS partition PR: 225813 Submitted by: James Wright <james.wright AT jigsawdezign.com> Modified: head/sbin/geom/class/part/gpart.8 head/sys/geom/part/g_part.c head/sys/geom/part/g_part.h head/sys/geom/part/g_part_gpt.c head/sys/sys/disk/gpt.h Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Sun Feb 11 03:21:06 2018 (r329118) +++ head/sbin/geom/class/part/gpart.8 Sun Feb 11 06:57:20 2018 (r329119) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 19, 2017 +.Dd February 10, 2018 .Dt GPART 8 .Os .Sh NAME @@ -654,6 +654,8 @@ Another symbolic names that can be used with .Cm gpart utility are: .Bl -tag -width ".Cm dragonfly-disklabel64" +.It Cm apple-apfs +An Apple macOS partition used for the Apple file system, APFS. .It Cm apple-core-storage An Apple Mac OS X partition used by logical volume manager known as Core Storage. Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Sun Feb 11 03:21:06 2018 (r329118) +++ head/sys/geom/part/g_part.c Sun Feb 11 06:57:20 2018 (r329119) @@ -71,6 +71,7 @@ struct g_part_alias_list { const char *lexeme; enum g_part_alias alias; } g_part_alias_list[G_PART_ALIAS_COUNT] = { + { "apple-apfs", G_PART_ALIAS_APPLE_APFS }, { "apple-boot", G_PART_ALIAS_APPLE_BOOT }, { "apple-core-storage", G_PART_ALIAS_APPLE_CORE_STORAGE }, { "apple-hfs", G_PART_ALIAS_APPLE_HFS }, Modified: head/sys/geom/part/g_part.h ============================================================================== --- head/sys/geom/part/g_part.h Sun Feb 11 03:21:06 2018 (r329118) +++ head/sys/geom/part/g_part.h Sun Feb 11 06:57:20 2018 (r329119) @@ -38,6 +38,7 @@ #define G_PART_PROBE_PRI_HIGH 0 enum g_part_alias { + G_PART_ALIAS_APPLE_APFS, /* An Apple APFS partition. */ G_PART_ALIAS_APPLE_BOOT, /* An Apple boot partition entry. */ G_PART_ALIAS_APPLE_CORE_STORAGE,/* An Apple Core Storage partition. */ G_PART_ALIAS_APPLE_HFS, /* An HFS+ file system entry. */ Modified: head/sys/geom/part/g_part_gpt.c ============================================================================== --- head/sys/geom/part/g_part_gpt.c Sun Feb 11 03:21:06 2018 (r329118) +++ head/sys/geom/part/g_part_gpt.c Sun Feb 11 06:57:20 2018 (r329119) @@ -147,6 +147,7 @@ static struct g_part_scheme g_part_gpt_scheme = { }; G_PART_SCHEME_DECLARE(g_part_gpt); +static struct uuid gpt_uuid_apple_apfs = GPT_ENT_TYPE_APPLE_APFS; static struct uuid gpt_uuid_apple_boot = GPT_ENT_TYPE_APPLE_BOOT; static struct uuid gpt_uuid_apple_core_storage = GPT_ENT_TYPE_APPLE_CORE_STORAGE; @@ -208,6 +209,7 @@ static struct g_part_uuid_alias { int alias; int mbrtype; } gpt_uuid_alias_match[] = { + { &gpt_uuid_apple_apfs, G_PART_ALIAS_APPLE_APFS, 0 }, { &gpt_uuid_apple_boot, G_PART_ALIAS_APPLE_BOOT, 0xab }, { &gpt_uuid_apple_core_storage, G_PART_ALIAS_APPLE_CORE_STORAGE, 0 }, { &gpt_uuid_apple_hfs, G_PART_ALIAS_APPLE_HFS, 0xaf }, Modified: head/sys/sys/disk/gpt.h ============================================================================== --- head/sys/sys/disk/gpt.h Sun Feb 11 03:21:06 2018 (r329118) +++ head/sys/sys/disk/gpt.h Sun Feb 11 06:57:20 2018 (r329119) @@ -183,6 +183,8 @@ CTASSERT(sizeof(struct gpt_ent) == 128); {0x5265636f,0x7665,0x11AA,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}} #define GPT_ENT_TYPE_APPLE_CORE_STORAGE \ {0x53746f72,0x6167,0x11AA,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}} +#define GPT_ENT_TYPE_APPLE_APFS \ + {0x7c3457ef,0x0000,0x11aa,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}} #define GPT_ENT_TYPE_NETBSD_FFS \ {0x49f48d5a,0xb10e,0x11dc,0xb9,0x9b,{0x00,0x19,0xd1,0x87,0x96,0x48}}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802110657.w1B6vKvT024572>