FreeBSD Bugzilla – Attachment 190494 Details for
Bug 225813
[geom][patch] gpart does not recognise Apple APFS partition type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for adding Apple APFS as a known GPT partition type
apfs_patch.diff (text/plain), 2.92 KB, created by
James Wright
on 2018-02-10 22:29:11 UTC
(
hide
)
Description:
Patch for adding Apple APFS as a known GPT partition type
Filename:
MIME Type:
Creator:
James Wright
Created:
2018-02-10 22:29:11 UTC
Size:
2.92 KB
patch
obsolete
>diff -u -r -N /usr/src/sys/geom/part/g_part.c ./usr/src/sys/geom/part/g_part.c >--- /usr/src/sys/geom/part/g_part.c 2018-01-29 14:17:08.229462000 +0000 >+++ ./usr/src/sys/geom/part/g_part.c 2018-02-10 03:27:44.855463000 +0000 >@@ -71,6 +71,7 @@ > 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 }, >diff -u -r -N /usr/src/sys/geom/part/g_part.h ./usr/src/sys/geom/part/g_part.h >--- /usr/src/sys/geom/part/g_part.h 2018-01-29 14:17:08.196290000 +0000 >+++ ./usr/src/sys/geom/part/g_part.h 2018-02-10 03:27:39.241960000 +0000 >@@ -38,6 +38,7 @@ > #define G_PART_PROBE_PRI_HIGH 0 > > enum g_part_alias { >+ G_PART_ALIAS_APPLE_APFS, /* An Apple APFS 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_HFS, /* An HFS+ file system entry. */ >diff -u -r -N /usr/src/sys/geom/part/g_part_gpt.c ./usr/src/sys/geom/part/g_part_gpt.c >--- /usr/src/sys/geom/part/g_part_gpt.c 2018-01-29 14:17:08.230462000 +0000 >+++ ./usr/src/sys/geom/part/g_part_gpt.c 2018-02-10 03:27:56.683270000 +0000 >@@ -147,6 +147,7 @@ > }; > 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 @@ > 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 }, >diff -u -r -N /usr/src/sys/sys/disk/gpt.h ./usr/src/sys/sys/disk/gpt.h >--- /usr/src/sys/sys/disk/gpt.h 2018-01-29 14:16:55.398570000 +0000 >+++ ./usr/src/sys/sys/disk/gpt.h 2018-02-10 03:26:39.509534000 +0000 >@@ -178,11 +178,13 @@ > #define GPT_ENT_TYPE_APPLE_RAID_OFFLINE \ > {0x52414944,0x5f4f,0x11aa,0xaa,0x22,{0x00,0x30,0x65,0x43,0xec,0xac}} > #define GPT_ENT_TYPE_APPLE_LABEL \ >- {0x4C616265,0x6c00,0x11aa,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}} >+ {0x4C616265,0x6c00,0x11aa,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}} > #define GPT_ENT_TYPE_APPLE_TV_RECOVERY \ >- {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 \ > {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}}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 225813
: 190494