Module Name:    src
Committed By:   martin
Date:           Sat Jun 11 15:41:19 UTC 2022

Modified Files:
        src/usr.sbin/sysinst: gpt.c label.c mbr.c

Log Message:
Enhance support for the pseudo file system type "EFI System Partition".


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/sysinst/gpt.c
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/sysinst/label.c
cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/sysinst/mbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/gpt.c
diff -u src/usr.sbin/sysinst/gpt.c:1.28 src/usr.sbin/sysinst/gpt.c:1.29
--- src/usr.sbin/sysinst/gpt.c:1.28	Sun Jan 30 11:58:29 2022
+++ src/usr.sbin/sysinst/gpt.c	Sat Jun 11 15:41:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: gpt.c,v 1.28 2022/01/30 11:58:29 martin Exp $	*/
+/*	$NetBSD: gpt.c,v 1.29 2022/06/11 15:41:19 martin Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -103,6 +103,8 @@ struct {
 	  .fsflags = GLM_MAYBE_FAT32|GLM_MAYBE_NTFS },
 	{ .name = "efi",	.fstype = FS_MSDOS,	.ptype = PT_EFI_SYSTEM,
 	  .fsflags = GLM_MAYBE_FAT32 },
+	{ .name = "efi",	.fstype = FS_EFI_SP,	.ptype = PT_EFI_SYSTEM,
+	  .fsflags = GLM_MAYBE_FAT32 },
 	{ .name = "bios",	.fstype = FS_MSDOS,	.ptype = PT_FAT,
 	  .fsflags = GLM_MAYBE_FAT32 },
 	{ .name = "lfs",	.fstype = FS_BSDLFS,	.ptype = PT_root },

Index: src/usr.sbin/sysinst/label.c
diff -u src/usr.sbin/sysinst/label.c:1.34 src/usr.sbin/sysinst/label.c:1.35
--- src/usr.sbin/sysinst/label.c:1.34	Thu Jun  9 18:26:06 2022
+++ src/usr.sbin/sysinst/label.c	Sat Jun 11 15:41:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: label.c,v 1.34 2022/06/09 18:26:06 martin Exp $	*/
+/*	$NetBSD: label.c,v 1.35 2022/06/11 15:41:19 martin Exp $	*/
 
 /*
  * Copyright 1997 Jonathan Stone
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: label.c,v 1.34 2022/06/09 18:26:06 martin Exp $");
+__RCSID("$NetBSD: label.c,v 1.35 2022/06/11 15:41:19 martin Exp $");
 #endif
 
 #include <sys/types.h>
@@ -1079,7 +1079,7 @@ update_edit_ptn_menu(menudesc *m, void *
 			continue;
 		if (m->opts[i].opt_action == edit_fs_preserve &&
 		    t != FS_BSDFFS && t != FS_BSDLFS && t != FS_APPLEUFS &&
-		    t != FS_MSDOS && t != FS_EX2FS) {
+		    t != FS_MSDOS && t != FS_EFI_SP && t != FS_EX2FS) {
 			/* Can not newfs this filesystem */
 			edit->wanted->instflags &= ~PUIINST_NEWFS;
 			continue;

Index: src/usr.sbin/sysinst/mbr.c
diff -u src/usr.sbin/sysinst/mbr.c:1.44 src/usr.sbin/sysinst/mbr.c:1.45
--- src/usr.sbin/sysinst/mbr.c:1.44	Sat Jun 11 15:30:48 2022
+++ src/usr.sbin/sysinst/mbr.c	Sat Jun 11 15:41:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.44 2022/06/11 15:30:48 martin Exp $ */
+/*	$NetBSD: mbr.c,v 1.45 2022/06/11 15:41:19 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -117,7 +117,7 @@ const struct {
 	{ .ptype=MBR_PTYPE_FAT16B, .desc="DOS FAT16, >32M" },
 	{ .ptype=MBR_PTYPE_FAT16L, .desc="Windows FAT16, LBA" },
 	{ .ptype=MBR_PTYPE_FAT32, .desc="Windows FAT32" },
-	{ .ptype=MBR_PTYPE_EFI, .desc="(U)EFI Boot" },
+	{ .ptype=MBR_PTYPE_EFI, .desc="(U)EFI system partition" },
 };
 
 /* bookeeping of available partition types (including custom ones) */
@@ -1187,6 +1187,8 @@ mbr_get_fs_part_type(enum part_type pt, 
 			return &mbr_gen_type_desc[sub_type].gen;
 		}
 		break;
+	case FS_EFI_SP:
+		return &mbr_gen_type_desc[MBR_PTYPE_EFI].gen;
 	}
 
 	return NULL;

Reply via email to