From owner-svn-src-all@FreeBSD.ORG Sat Feb 19 15:22:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5A40106564A; Sat, 19 Feb 2011 15:22:06 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4F7D8FC12; Sat, 19 Feb 2011 15:22:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1JFM6Vm000404; Sat, 19 Feb 2011 15:22:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1JFM6s8000402; Sat, 19 Feb 2011 15:22:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201102191522.p1JFM6s8000402@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 19 Feb 2011 15:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218855 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2011 15:22:06 -0000 Author: nwhitehorn Date: Sat Feb 19 15:22:06 2011 New Revision: 218855 URL: http://svn.freebsd.org/changeset/base/218855 Log: Don't present the user with spurious errors when overwriting a disk with a deleted, but uncommitted, gpart. Reported by: brucec Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c Modified: head/usr.sbin/bsdinstall/partedit/part_wizard.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/part_wizard.c Sat Feb 19 14:57:00 2011 (r218854) +++ head/usr.sbin/bsdinstall/partedit/part_wizard.c Sat Feb 19 15:22:06 2011 (r218855) @@ -213,6 +213,10 @@ wizard_partition(struct gmesh *mesh, con } } + /* 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)