Add GUID and alias for Apple APFS partition

PR:		225813
Submitted by:	James Wright <james.wright AT jigsawdezign.com>
This commit is contained in:
Conrad Meyer 2018-02-11 06:57:20 +00:00
parent e6c0055599
commit b42712a8b7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329119
5 changed files with 9 additions and 1 deletions

View File

@ -24,7 +24,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd September 19, 2017 .Dd February 10, 2018
.Dt GPART 8 .Dt GPART 8
.Os .Os
.Sh NAME .Sh NAME
@ -654,6 +654,8 @@ Another symbolic names that can be used with
.Cm gpart .Cm gpart
utility are: utility are:
.Bl -tag -width ".Cm dragonfly-disklabel64" .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 .It Cm apple-core-storage
An Apple Mac OS X partition used by logical volume manager known as An Apple Mac OS X partition used by logical volume manager known as
Core Storage. Core Storage.

View File

@ -71,6 +71,7 @@ struct g_part_alias_list {
const char *lexeme; const char *lexeme;
enum g_part_alias alias; enum g_part_alias alias;
} g_part_alias_list[G_PART_ALIAS_COUNT] = { } g_part_alias_list[G_PART_ALIAS_COUNT] = {
{ "apple-apfs", G_PART_ALIAS_APPLE_APFS },
{ "apple-boot", G_PART_ALIAS_APPLE_BOOT }, { "apple-boot", G_PART_ALIAS_APPLE_BOOT },
{ "apple-core-storage", G_PART_ALIAS_APPLE_CORE_STORAGE }, { "apple-core-storage", G_PART_ALIAS_APPLE_CORE_STORAGE },
{ "apple-hfs", G_PART_ALIAS_APPLE_HFS }, { "apple-hfs", G_PART_ALIAS_APPLE_HFS },

View File

@ -38,6 +38,7 @@
#define G_PART_PROBE_PRI_HIGH 0 #define G_PART_PROBE_PRI_HIGH 0
enum g_part_alias { 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_BOOT, /* An Apple boot partition entry. */
G_PART_ALIAS_APPLE_CORE_STORAGE,/* An Apple Core Storage partition. */ G_PART_ALIAS_APPLE_CORE_STORAGE,/* An Apple Core Storage partition. */
G_PART_ALIAS_APPLE_HFS, /* An HFS+ file system entry. */ G_PART_ALIAS_APPLE_HFS, /* An HFS+ file system entry. */

View File

@ -147,6 +147,7 @@ static struct g_part_scheme g_part_gpt_scheme = {
}; };
G_PART_SCHEME_DECLARE(g_part_gpt); 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_boot = GPT_ENT_TYPE_APPLE_BOOT;
static struct uuid gpt_uuid_apple_core_storage = static struct uuid gpt_uuid_apple_core_storage =
GPT_ENT_TYPE_APPLE_CORE_STORAGE; GPT_ENT_TYPE_APPLE_CORE_STORAGE;
@ -208,6 +209,7 @@ static struct g_part_uuid_alias {
int alias; int alias;
int mbrtype; int mbrtype;
} gpt_uuid_alias_match[] = { } 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_boot, G_PART_ALIAS_APPLE_BOOT, 0xab },
{ &gpt_uuid_apple_core_storage, G_PART_ALIAS_APPLE_CORE_STORAGE, 0 }, { &gpt_uuid_apple_core_storage, G_PART_ALIAS_APPLE_CORE_STORAGE, 0 },
{ &gpt_uuid_apple_hfs, G_PART_ALIAS_APPLE_HFS, 0xaf }, { &gpt_uuid_apple_hfs, G_PART_ALIAS_APPLE_HFS, 0xaf },

View File

@ -183,6 +183,8 @@ CTASSERT(sizeof(struct gpt_ent) == 128);
{0x5265636f,0x7665,0x11AA,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}} {0x5265636f,0x7665,0x11AA,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}}
#define GPT_ENT_TYPE_APPLE_CORE_STORAGE \ #define GPT_ENT_TYPE_APPLE_CORE_STORAGE \
{0x53746f72,0x6167,0x11AA,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}} {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 \ #define GPT_ENT_TYPE_NETBSD_FFS \
{0x49f48d5a,0xb10e,0x11dc,0xb9,0x9b,{0x00,0x19,0xd1,0x87,0x96,0x48}} {0x49f48d5a,0xb10e,0x11dc,0xb9,0x9b,{0x00,0x19,0xd1,0x87,0x96,0x48}}