aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/setup.c
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2009-01-30 18:33:05 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2009-01-30 18:33:05 +0000
commit111a52201c666af03357391624dc12e8e47b09ec (patch)
tree65f596e651497e62a137531d7771a73ad6ee6ac8 /sbin/fsck_ffs/setup.c
parent74f13fb3b6d70ab628f671d7566e8d4bc47da2e7 (diff)
Add the '-C' "check clean" flag. If the FS is marked clean, skip file
system checking. However, if the file system is not clean, perform a full fsck. Reviewed by: delphij Obtained from: Juniper Networks
Notes
Notes: svn path=/head/; revision=187931
Diffstat (limited to 'sbin/fsck_ffs/setup.c')
-rw-r--r--sbin/fsck_ffs/setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c
index f6b37a31cdec..1628ffbc3347 100644
--- a/sbin/fsck_ffs/setup.c
+++ b/sbin/fsck_ffs/setup.c
@@ -65,7 +65,7 @@ static struct disklabel *getdisklabel(char *s, int fd);
/*
* Read in a superblock finding an alternate if necessary.
* Return 1 if successful, 0 if unsuccessful, -1 if file system
- * is already clean (preen mode only).
+ * is already clean (ckclean and preen mode only).
*/
int
setup(char *dev)
@@ -201,7 +201,7 @@ setup(char *dev)
pwarn("USING ALTERNATE SUPERBLOCK AT %d\n", bflag);
bflag = 0;
}
- if (skipclean && preen && sblock.fs_clean) {
+ if (skipclean && ckclean && sblock.fs_clean) {
pwarn("FILE SYSTEM CLEAN; SKIPPING CHECKS\n");
return (-1);
}