summaryrefslogtreecommitdiff
path: root/sbin/fdisk/fdisk.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fdisk/fdisk.c')
-rw-r--r--sbin/fdisk/fdisk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c
index b1f3870a964..59a43da8daf 100644
--- a/sbin/fdisk/fdisk.c
+++ b/sbin/fdisk/fdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdisk.c,v 1.113 2021/06/25 19:24:53 krw Exp $ */
+/* $OpenBSD: fdisk.c,v 1.114 2021/06/28 19:50:30 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -222,14 +222,14 @@ main(int argc, char *argv[])
if (letoh64(gh.gh_sig) != GPTSIGNATURE)
errx(1, "-A requires a valid GPT");
else {
- MBR_init_GPT(&initial_mbr);
- GPT_init();
+ initial_mbr = mbr; /* Keep current MBR. */
+ GPT_init(GPONLY, b_sectors);
query = "Do you wish to write new GPT?";
}
} else if (i_flag) {
if (g_flag) {
MBR_init_GPT(&initial_mbr);
- GPT_init();
+ GPT_init(GHANDGP, b_sectors);
query = "Do you wish to write new GPT?";
} else {
memset(&gh, 0, sizeof(gh));