diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2023-11-10 16:20:53 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2023-11-10 16:20:53 +0000 |
commit | 221414d5b97aacd40f08eeda664b11fdcf1b9f4e (patch) | |
tree | ba5c86c1604234be84ab7d18fbea453ad90be03f | |
parent | 1524ac9606cde080a010471080bcb2b0a530940a (diff) |
GPT partitions have many attributes. Don't stomp on them all when
using 'flag <part #>' to make a partition the only bootable partition.
Just turn off the bootable bit in the other partitions.
ok dlg@
-rw-r--r-- | sbin/fdisk/cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c index 895a1781d71..fa0399ec74f 100644 --- a/sbin/fdisk/cmd.c +++ b/sbin/fdisk/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.177 2023/11/10 15:41:11 krw Exp $ */ +/* $OpenBSD: cmd.c,v 1.178 2023/11/10 16:20:52 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -517,7 +517,7 @@ Xflag(const char *args, struct mbr *mbr) if (i == pn) gp[i].gp_attrs = GPTPARTATTR_BOOTABLE; else - gp[i].gp_attrs = 0; + gp[i].gp_attrs &= ~GPTPARTATTR_BOOTABLE; } } else { for (i = 0; i < nitems(mbr->mbr_prt); i++) { |