summaryrefslogtreecommitdiff
path: root/sbin/fdisk/cmd.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2022-09-11 11:47:56 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2022-09-11 11:47:56 +0000
commit979f7810d8ef1b40b192dc3d6d3d1a51df280367 (patch)
tree14dcb40d1cb75af0928185a2500e9a6059b42f39 /sbin/fdisk/cmd.c
parent2a06b987ff48be845b177cbbd5fb99cf0ed2faf7 (diff)
Add #define's for GPT partition attribute bits REQUIRED, IGNORE
and BOOTABLE, set BOOTABLE attribute bit instead of using the incorrect GPTDOSACTIVE value, have 'fdisk -v' print out GPT partition attributes if any of the 64 bits are set, don't spoof any partition with REQUIRED bit set. Prompted by kettenis@ stumbling across a machine with 40+ (!!) REQUIRED GPT partitions. Tested & ok kettenis@
Diffstat (limited to 'sbin/fdisk/cmd.c')
-rw-r--r--sbin/fdisk/cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c
index dc8698901b9..99146bfc22e 100644
--- a/sbin/fdisk/cmd.c
+++ b/sbin/fdisk/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.164 2022/07/25 17:45:16 krw Exp $ */
+/* $OpenBSD: cmd.c,v 1.165 2022/09/11 11:47:55 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -488,7 +488,7 @@ Xflag(const char *args, struct mbr *mbr)
if (gh.gh_sig == GPTSIGNATURE) {
for (i = 0; i < gh.gh_part_num; i++) {
if (i == pn)
- gp[i].gp_attrs = GPTDOSACTIVE;
+ gp[i].gp_attrs = GPTPARTATTR_BOOTABLE;
else
gp[i].gp_attrs = 0;
}