summaryrefslogtreecommitdiff
path: root/sbin/fdisk/part.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2023-03-25 22:00:29 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2023-03-25 22:00:29 +0000
commit7e713f7570c95e1c0a0c18fa0f0344cf6ea4199e (patch)
tree0cd746d4b66dea7f2612182f3350a7cf03fac375 /sbin/fdisk/part.c
parent1261ba5a1cd9d0ed0241b2d5f2267d0cae0286e3 (diff)
Add comments documenting possible sources for MBR partition types
and GPT partition GUIDs. No functional change.
Diffstat (limited to 'sbin/fdisk/part.c')
-rw-r--r--sbin/fdisk/part.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sbin/fdisk/part.c b/sbin/fdisk/part.c
index 3dad50ffc55..8bb17ba5880 100644
--- a/sbin/fdisk/part.c
+++ b/sbin/fdisk/part.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: part.c,v 1.135 2023/03/25 19:37:34 krw Exp $ */
+/* $OpenBSD: part.c,v 1.136 2023/03/25 22:00:28 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -36,6 +36,12 @@ struct mbr_type {
char *mt_name;
};
+/*
+* MBR type sources:
+* OpenBSD Historical usage
+* https://en.wikipedia.org/wiki/Partition_type#List_of_partition_IDs
+* https://www.win.tue.nl/~aeb/partitions/partition_types-1.html
+*/
const struct mbr_type mbr_types[] = {
{ 0x00, "unused" }, /* unused */
{ 0x01, "DOS FAT-12" }, /* Primary DOS with 12 bit FAT */
@@ -143,6 +149,17 @@ struct gpt_type {
char gt_guid[UUID_STR_LEN + 1];
};
+/*
+ * GPT GUID sources:
+ *
+ * UEFI: UEFI Specification 2.9, March 2021, Section 5.3.3, Table 5.7
+ * Wikipedia: https://en.wikipedia.org/wiki/GUID_Partition_Table
+ * NetBSD: /usr/src/sys/sys/disklabel_gpt.h
+ * FreeBSD: /usr/src/sys/sys/disk/gpt.h.
+ * DragonFlyBSD: /usr/src/sys/sys/disk/gpt.h.
+ * Systemd:https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
+ * https://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html
+ */
const struct gpt_type gpt_types[] = {
{ 0x00, 0, "unused",
"00000000-0000-0000-0000-000000000000" },