aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2019-11-04 12:20:19 +0000
committerKyle Evans <kevans@FreeBSD.org>2021-10-08 01:15:58 +0000
commitaf0a40e211b8f9fe37b4bbbe77436377768ca49d (patch)
treeef1e4f091acd9c15324050905da4bceec9e67366
parent2f6799782529d18e13eb9bb102b942338a2829c8 (diff)
downloadsrc-af0a40e211b8f9fe37b4bbbe77436377768ca49d.tar.gz
src-af0a40e211b8f9fe37b4bbbe77436377768ca49d.zip
loader: show APFS partition type name
Add small visual aid in lsdev output. (cherry picked from commit 124003d5870a2da22648cfd8d9a71fda4f0d64a7)
-rw-r--r--stand/common/part.c4
-rw-r--r--stand/common/part.h3
2 files changed, 6 insertions, 1 deletions
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 {