summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/fdisk/user.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sbin/fdisk/user.c b/sbin/fdisk/user.c
index b02b712d86a..ab40e1a238e 100644
--- a/sbin/fdisk/user.c
+++ b/sbin/fdisk/user.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: user.c,v 1.46 2015/11/13 02:27:17 krw Exp $ */
+/* $OpenBSD: user.c,v 1.47 2015/11/18 02:12:51 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -74,6 +74,13 @@ USER_edit(off_t offset, off_t reloff)
/* Parse the sucker */
MBR_parse(&dos_mbr, offset, reloff, &mbr);
+ if (editlevel == 1) {
+ memset(&gh, 0, sizeof(gh));
+ memset(&gp, 0, sizeof(gp));
+ if (MBR_protective_mbr(&mbr) == 0)
+ GPT_get_gpt();
+ }
+
printf("Enter 'help' for information\n");
/* Edit cycle */