Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Oct 2021 01:16:24 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: af0a40e211b8 - stable/12 - loader: show APFS partition type name
Message-ID:  <202110080116.1981GOll010524@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=af0a40e211b8f9fe37b4bbbe77436377768ca49d

commit af0a40e211b8f9fe37b4bbbe77436377768ca49d
Author:     Toomas Soome <tsoome@FreeBSD.org>
AuthorDate: 2019-11-04 12:20:19 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2021-10-08 01:15:58 +0000

    loader: show APFS partition type name
    
    Add small visual aid in lsdev output.
    
    (cherry picked from commit 124003d5870a2da22648cfd8d9a71fda4f0d64a7)
---
 stand/common/part.c | 4 ++++
 stand/common/part.h | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/stand/common/part.c b/stand/common/part.c
index e4caa21307e3..b84678efd3cc 100644
--- a/stand/common/part.c
+++ b/stand/common/part.c
@@ -61,6 +61,7 @@ static const uuid_t gpt_uuid_freebsd_nandfs = GPT_ENT_TYPE_FREEBSD_NANDFS;
 static const uuid_t gpt_uuid_freebsd_swap = GPT_ENT_TYPE_FREEBSD_SWAP;
 static const uuid_t gpt_uuid_freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS;
 static const uuid_t gpt_uuid_freebsd_vinum = GPT_ENT_TYPE_FREEBSD_VINUM;
+static const uuid_t gpt_uuid_apple_apfs = GPT_ENT_TYPE_APPLE_APFS;
 #endif
 
 struct pentry {
@@ -100,6 +101,7 @@ static struct parttypes {
 	{ PART_LINUX_SWAP,	"Linux swap" },
 	{ PART_DOS,		"DOS/Windows" },
 	{ PART_ISO9660,		"ISO9660" },
+	{ PART_APFS,		"APFS" },
 };
 
 const char *
@@ -145,6 +147,8 @@ gpt_parttype(uuid_t type)
 		return (PART_FREEBSD_NANDFS);
 	else if (uuid_equal(&type, &gpt_uuid_freebsd, NULL))
 		return (PART_FREEBSD);
+	else if (uuid_equal(&type, &gpt_uuid_apple_apfs, NULL))
+		return (PART_APFS);
 	return (PART_UNKNOWN);
 }
 
diff --git a/stand/common/part.h b/stand/common/part.h
index 3eac476b6d66..6ac435b1d21b 100644
--- a/stand/common/part.h
+++ b/stand/common/part.h
@@ -53,7 +53,8 @@ enum partition_type {
 	PART_LINUX,
 	PART_LINUX_SWAP,
 	PART_DOS,
-	PART_ISO9660
+	PART_ISO9660,
+	PART_APFS
 };
 
 struct ptable_entry {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110080116.1981GOll010524>