summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2011-02-19 15:22:06 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2011-02-19 15:22:06 +0000
commit3f3be9a2776dc2d2d894363327d114a649eb2551 (patch)
treea8665e8c85893c46a2b5b4fa6c9a32c995f6d379 /usr.sbin
parentf16cfd83169b40cb7f6b0bb6aa3805f482281b9c (diff)
downloadFreeBSD-src-3f3be9a2776dc2d2d894363327d114a649eb2551.zip
FreeBSD-src-3f3be9a2776dc2d2d894363327d114a649eb2551.tar.gz
Don't present the user with spurious errors when overwriting a disk with
a deleted, but uncommitted, gpart. Reported by: brucec
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bsdinstall/partedit/part_wizard.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c
index e18293a..6794381 100644
--- a/usr.sbin/bsdinstall/partedit/part_wizard.c
+++ b/usr.sbin/bsdinstall/partedit/part_wizard.c
@@ -213,6 +213,10 @@ wizard_partition(struct gmesh *mesh, const char *disk)
}
}
+ /* Treat uncommitted scheme deletions as no scheme */
+ if (scheme != NULL && strcmp(scheme, "(none)") == 0)
+ scheme = NULL;
+
query:
dialog_vars.yes_label = "Entire Disk";
dialog_vars.no_label = "Partition";
@@ -247,8 +251,9 @@ query:
scheme = default_scheme();
}
- if (scheme == NULL || strcmp(scheme, "(none)") == 0 || choice == 0) {
- if (gpart != NULL) { /* Erase partitioned disk */
+ if (scheme == NULL || choice == 0) {
+ if (gpart != NULL && scheme != NULL) {
+ /* Erase partitioned disk */
choice = dialog_yesno("Confirmation", "This will erase "
"the disk. Are you sure you want to proceed?", 0, 0);
if (choice != 0)
OpenPOWER on IntegriCloud