2006-08-05 Theodore Tso <tytso@mit.edu>
+ * mke2fs.c (PRS), util.c (check_mount): In order to force mke2fs
+ to create a filesystem even though it appears to be in use
+ or mounted, the -F (force) flag must be specified twice.
+
* filefrag.c: Change EXT3_EXTENTS_FL to EXT4_EXTENTS_FL
2006-07-15 Theodore Tso <tytso@mit.edu>
.B \-F
Force
.B mke2fs
-to run, even if the specified device is not a
-block special device, or appears to be mounted.
+to create a filesystem, even if the specified device is not a partition
+on a block special device, or if other parameters do not make sense.
+In order to force
+.B mke2fs
+to create a filesystem even if the filesystem appears to be in use
+or is mounted (a truly dangerous thing to do), this option must be
+specified twice.
.TP
.BI \-g " blocks-per-group"
Specify the number of blocks in a block group. There is generally no
verbose = 1;
break;
case 'F':
- force = 1;
+ force++;
break;
case 'L':
volume_label = optarg;
}
if (mount_flags & EXT2_MF_MOUNTED) {
fprintf(stderr, _("%s is mounted; "), device);
- if (force) {
+ if (force > 2) {
fputs(_("mke2fs forced anyway. Hope /etc/mtab is "
"incorrect.\n"), stderr);
return;
if (mount_flags & EXT2_MF_BUSY) {
fprintf(stderr, _("%s is apparently in use by the system; "),
device);
- if (force) {
+ if (force > 2) {
fputs(_("mke2fs forced anyway.\n"), stderr);
return;
}