svn commit: r217799 - user/nwhitehorn/bsdinstall/partedit
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Mon Jan 24 18:24:28 UTC 2011
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 "
More information about the svn-src-user
mailing list