From owner-svn-src-user@FreeBSD.ORG Mon Jan 24 18:24:28 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F3FA106566B; Mon, 24 Jan 2011 18:24:28 +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 7E7018FC08; Mon, 24 Jan 2011 18:24:28 +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 p0OIOS4Q002014; Mon, 24 Jan 2011 18:24:28 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0OIOS1I002012; Mon, 24 Jan 2011 18:24:28 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201101241824.p0OIOS1I002012@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 24 Jan 2011 18:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217799 - user/nwhitehorn/bsdinstall/partedit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2011 18:24:28 -0000 Author: nwhitehorn Date: Mon Jan 24 18:24:28 2011 New Revision: 217799 URL: http://svn.freebsd.org/changeset/base/217799 Log: Warn the user if they choose to keep the existing partitioning, but the selected disk is unbootable on this platform. Modified: user/nwhitehorn/bsdinstall/partedit/part_wizard.c Modified: user/nwhitehorn/bsdinstall/partedit/part_wizard.c ============================================================================== --- user/nwhitehorn/bsdinstall/partedit/part_wizard.c Mon Jan 24 18:11:37 2011 (r217798) +++ user/nwhitehorn/bsdinstall/partedit/part_wizard.c Mon Jan 24 18:24:28 2011 (r217799) @@ -201,6 +201,24 @@ query: dialog_vars.no_label = NULL; dialog_vars.defaultno = FALSE; + if (choice == 1 && scheme != NULL && !is_scheme_bootable(scheme)) { + char warning[512]; + int subchoice; + + sprintf(warning, "The existing partition scheme on this " + "disk (%s) is not bootable on this platform. To install " + "FreeBSD, it must be repartitioned. This will destroy all " + "data on the disk. Are you sure you want to proceed?", + scheme); + subchoice = dialog_yesno("Non-bootable Disk", warning, 0, 0); + if (subchoice != 0) + goto query; + + gpart_destroy(gpart, 1); + gpart_partition(disk, default_scheme()); + scheme = default_scheme(); + } + if (scheme == NULL || strcmp(scheme, "(none)") == 0 || choice == 0) { if (gpart != NULL) { /* Erase partitioned disk */ choice = dialog_yesno("Confirmation", "This will erase "