diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2012-12-30 14:33:16 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2012-12-30 14:33:16 +0000 |
commit | abab2255bc73c60a2ca08423d05b6dbf9e282cc4 (patch) | |
tree | 1a1b7e3a0d707ef65671a1fe187f7ba7dbdb3ca5 /usr.sbin/bsdinstall | |
parent | f250bca4bbed2a7b99a98f3e8357027d7bd22bec (diff) | |
download | FreeBSD-src-abab2255bc73c60a2ca08423d05b6dbf9e282cc4.zip FreeBSD-src-abab2255bc73c60a2ca08423d05b6dbf9e282cc4.tar.gz |
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
Diffstat (limited to 'usr.sbin/bsdinstall')
-rw-r--r-- | usr.sbin/bsdinstall/partedit/partedit.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index 2436f08..d470c80 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -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 " |