svn commit: r354332 - head/stand/common

Toomas Soome tsoome at FreeBSD.org
Mon Nov 4 12:20:20 UTC 2019


Author: tsoome
Date: Mon Nov  4 12:20:19 2019
New Revision: 354332
URL: https://svnweb.freebsd.org/changeset/base/354332

Log:
  loader: show APFS partition type name
  
  Add small visual aid in lsdev output.

Modified:
  head/stand/common/part.c
  head/stand/common/part.h

Modified: head/stand/common/part.c
==============================================================================
--- head/stand/common/part.c	Mon Nov  4 09:49:58 2019	(r354331)
+++ head/stand/common/part.c	Mon Nov  4 12:20:19 2019	(r354332)
@@ -60,6 +60,7 @@ static const uuid_t gpt_uuid_freebsd_boot = GPT_ENT_TY
 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);
 }
 

Modified: head/stand/common/part.h
==============================================================================
--- head/stand/common/part.h	Mon Nov  4 09:49:58 2019	(r354331)
+++ head/stand/common/part.h	Mon Nov  4 12:20:19 2019	(r354332)
@@ -52,7 +52,8 @@ enum partition_type {
 	PART_LINUX,
 	PART_LINUX_SWAP,
 	PART_DOS,
-	PART_ISO9660
+	PART_ISO9660,
+	PART_APFS
 };
 
 struct ptable_entry {


More information about the svn-src-head mailing list