aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsck_msdosfs/check.c5
-rw-r--r--sbin/fsck_msdosfs/ext.h2
-rw-r--r--sbin/fsck_msdosfs/main.c6
3 files changed, 6 insertions, 7 deletions
diff --git a/sbin/fsck_msdosfs/check.c b/sbin/fsck_msdosfs/check.c
index 6a4074915093..48ae5ca20eb1 100644
--- a/sbin/fsck_msdosfs/check.c
+++ b/sbin/fsck_msdosfs/check.c
@@ -84,9 +84,8 @@ checkfilesys(const char *fname)
return 8;
}
- if (checkdirty(dosfs, &boot) && !force) {
- if (preen)
- printf("%s: ", fname);
+ if (skipclean && preen && checkdirty(dosfs, &boot)) {
+ printf("%s: ", fname);
printf("FILESYSTEM CLEAN; SKIPPING CHECKS\n");
ret = 0;
goto out;
diff --git a/sbin/fsck_msdosfs/ext.h b/sbin/fsck_msdosfs/ext.h
index 7a24a5da976e..0e93c2440200 100644
--- a/sbin/fsck_msdosfs/ext.h
+++ b/sbin/fsck_msdosfs/ext.h
@@ -46,9 +46,9 @@
*/
extern int alwaysno; /* assume "no" for all questions */
extern int alwaysyes; /* assume "yes" for all questions */
-extern int force; /* force check even the fs is clean */
extern int preen; /* we are preening */
extern int rdonly; /* device is opened read only (supersedes above) */
+extern int skipclean; /* skip clean file systems if preening */
extern struct dosDirEntry *rootDir;
diff --git a/sbin/fsck_msdosfs/main.c b/sbin/fsck_msdosfs/main.c
index b0e852eb6cca..37bfb6e3cb52 100644
--- a/sbin/fsck_msdosfs/main.c
+++ b/sbin/fsck_msdosfs/main.c
@@ -51,9 +51,9 @@ static const char rcsid[] =
int alwaysno; /* assume "no" for all questions */
int alwaysyes; /* assume "yes" for all questions */
-int force; /* force check even the fs is clean */
int preen; /* set when preening */
int rdonly; /* device is opened read only (supersedes above) */
+int skipclean; /* skip clean file systems if preening */
static void usage(void) __dead2;
@@ -71,11 +71,11 @@ main(int argc, char **argv)
int ret = 0, erg;
int ch;
- force = 0;
+ skipclean = 1;
while ((ch = getopt(argc, argv, "fFnpy")) != -1) {
switch (ch) {
case 'f':
- force = 1;
+ skipclean = 0;
break;
case 'F':
/*