From 124003d5870a2da22648cfd8d9a71fda4f0d64a7 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Mon, 4 Nov 2019 12:20:19 +0000 Subject: [PATCH] loader: show APFS partition type name Add small visual aid in lsdev output. --- 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 8eb4c065b473..0d5b6cfddfe0 100644 --- a/stand/common/part.c +++ b/stand/common/part.c @@ -60,6 +60,7 @@ static const uuid_t gpt_uuid_freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT; 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 { @@ -98,6 +99,7 @@ static struct parttypes { { PART_LINUX_SWAP, "Linux swap" }, { PART_DOS, "DOS/Windows" }, { PART_ISO9660, "ISO9660" }, + { PART_APFS, "APFS" }, }; const char * @@ -141,6 +143,8 @@ gpt_parttype(uuid_t type) return (PART_FREEBSD_VINUM); 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 490db6746c38..b991ae3c381c 100644 --- a/stand/common/part.h +++ b/stand/common/part.h @@ -52,7 +52,8 @@ enum partition_type { PART_LINUX, PART_LINUX_SWAP, PART_DOS, - PART_ISO9660 + PART_ISO9660, + PART_APFS }; struct ptable_entry {