From: Theodore Ts'o Date: Tue, 29 Jun 1999 14:37:35 +0000 (+0000) Subject: mke2fs.c, ChangeLog, mke2fs.8.in: X-Git-Tag: E2FSPROGS-1_15~24 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=ca3c32851031bf51bacf59e5d7ac581b1c8347fe;p=tools%2Fe2fsprogs.git mke2fs.c, ChangeLog, mke2fs.8.in: mke2fs.c (check_mount): Allow a filesystem to be made even if it appears mounted if the force option is given. --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 6a94aeb..668b4c5 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +1999-06-29 + + * mke2fs.c (check_mount): Allow a filesystem to be made even if it + appears mounted if the force option is given. + 1999-06-24 * mke2fs.8.in: Fix typo in man page which caused the badblocks diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in index 94cb969..57423d2 100644 --- a/misc/mke2fs.8.in +++ b/misc/mke2fs.8.in @@ -156,7 +156,7 @@ Verbose execution. Force .B mke2fs to run, even if the specified device is not a -block special device. +block special device, or appears to be mounted. .TP .I -L Set the volume label for the filesystem. diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 9469d16..1eb7a6e 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -175,10 +175,15 @@ static void check_mount(NOARGS) } if (!(mount_flags & EXT2_MF_MOUNTED)) return; - - fprintf(stderr, "%s is mounted; will not make a filesystem here!\n", - device_name); - exit(1); + + fprintf(stderr, "%s is mounted; ", device_name); + if (force) { + fprintf(stderr, "mke2fs forced anyway. " + "Hope /etc/mtab is incorrect.\n"); + } else { + fprintf(stderr, "will not make a filesystem here!\n"); + exit(1); + } } /*