Date: Sun, 30 Dec 2012 14:33:17 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244858 - head/usr.sbin/bsdinstall/partedit Message-ID: <201212301433.qBUEXHf4019323@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 "
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212301433.qBUEXHf4019323>