svn commit: r244858 - head/usr.sbin/bsdinstall/partedit
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sun Dec 30 14:33:17 UTC 2012
Author: nwhitehorn
Date: Sun Dec 30 14:33:16 2012
New Revision: 244858
URL: http://svnweb.freebsd.org/changeset/base/244858
Log:
If invoked as sade, don't complain about having a filesystem on / already
-- it's something you expect (and indeed hope for).
MFC after: 1 week
Modified:
head/usr.sbin/bsdinstall/partedit/partedit.c
Modified: head/usr.sbin/bsdinstall/partedit/partedit.c
==============================================================================
--- head/usr.sbin/bsdinstall/partedit/partedit.c Sun Dec 30 13:47:40 2012 (r244857)
+++ head/usr.sbin/bsdinstall/partedit/partedit.c Sun Dec 30 14:33:16 2012 (r244858)
@@ -41,6 +41,7 @@
#include "partedit.h"
struct pmetadata_head part_metadata;
+static int sade_mode = 0;
static int apply_changes(struct gmesh *mesh);
static struct partedit_item *read_geom_mesh(struct gmesh *mesh, int *nitems);
@@ -75,12 +76,15 @@ main(int argc, const char **argv)
int i, op, nitems, nscroll;
int error;
+ if (strcmp(basename(argv[0]), "sade") == 0)
+ sade_mode = 1;
+
TAILQ_INIT(&part_metadata);
init_fstab_metadata();
init_dialog(stdin, stdout);
- if (strcmp(basename(argv[0]), "sade") != 0)
+ if (!sade_mode)
dialog_vars.backtitle = __DECONST(char *, "FreeBSD Installer");
dialog_vars.item_help = TRUE;
nscroll = i = 0;
@@ -261,7 +265,7 @@ validate_setup(void)
* Check for root partitions that we aren't formatting, which is
* usually a mistake
*/
- if (root->newfs == NULL) {
+ if (root->newfs == NULL && !sade_mode) {
dialog_vars.defaultno = TRUE;
cancel = dialog_yesno("Warning", "The chosen root partition "
"has a preexisting filesystem. If it contains an existing "
More information about the svn-src-all
mailing list