Index: fsck.h =================================================================== RCS file: /home/ncvs/src/sbin/fsck_ffs/fsck.h,v retrieving revision 1.36 diff -a -u -r1.36 fsck.h --- fsck.h 7 Mar 2005 08:42:49 -0000 1.36 +++ fsck.h 24 Oct 2006 12:04:38 -0000 @@ -280,6 +280,7 @@ char resolved; /* cleared if unresolved changes => not clean */ char havesb; /* superblock has been read */ char skipclean; /* skip clean file systems if preening */ +char forceskipclean; /* skip clean file systems (always) */ int fsmodified; /* 1 => write done to file system */ int fsreadfd; /* file descriptor for reading file system */ int fswritefd; /* file descriptor for writing file system */ Index: fsck_ffs.8 =================================================================== RCS file: /home/ncvs/src/sbin/fsck_ffs/fsck_ffs.8,v retrieving revision 1.34 diff -a -u -r1.34 fsck_ffs.8 --- fsck_ffs.8 20 Sep 2005 08:02:38 -0000 1.34 +++ fsck_ffs.8 24 Oct 2006 12:04:38 -0000 @@ -38,7 +38,7 @@ .Nd file system consistency check and interactive repair .Sh SYNOPSIS .Nm -.Op Fl BFpfny +.Op Fl BCFpfny .Op Fl b Ar block .Op Fl c Ar level .Op Fl m Ar mode @@ -170,6 +170,8 @@ the file system is marked as needing a foreground check and .Nm exits without attempting any further cleaning. +.It Fl C +The file systems marked clean are always skipped (not only in preen mode). .It Fl b Use the block specified immediately after the flag as the super block for the file system. Index: main.c =================================================================== RCS file: /home/ncvs/src/sbin/fsck_ffs/main.c,v retrieving revision 1.44 diff -a -u -r1.44 main.c --- main.c 10 Feb 2005 09:19:29 -0000 1.44 +++ main.c 24 Oct 2006 12:04:38 -0000 @@ -79,7 +79,7 @@ sync(); skipclean = 1; - while ((ch = getopt(argc, argv, "b:Bc:dfFm:npy")) != -1) { + while ((ch = getopt(argc, argv, "b:Bc:CdfFm:npy")) != -1) { switch (ch) { case 'b': skipclean = 0; @@ -99,6 +99,10 @@ cvtlevel); break; + case 'C': + forceskipclean = 1; + break; + case 'd': debug++; break; @@ -263,7 +267,7 @@ "CANNOT RUN IN BACKGROUND\n"); } if ((sblock.fs_flags & FS_UNCLEAN) == 0 && - skipclean && preen) { + (skipclean && (preen || forceskipclean)) ) { /* * file system is clean; * skip snapshot and report it clean @@ -531,7 +535,7 @@ usage(void) { (void) fprintf(stderr, - "usage: %s [-BFpfny] [-b block] [-c level] [-m mode] " + "usage: %s [-BCFpfny] [-b block] [-c level] [-m mode] " "filesystem ...\n", getprogname()); exit(1); Index: setup.c =================================================================== RCS file: /home/ncvs/src/sbin/fsck_ffs/setup.c,v retrieving revision 1.49 diff -a -u -r1.49 setup.c --- setup.c 7 Mar 2005 08:42:49 -0000 1.49 +++ setup.c 24 Oct 2006 12:04:38 -0000 @@ -201,7 +201,7 @@ pwarn("USING ALTERNATE SUPERBLOCK AT %d\n", bflag); bflag = 0; } - if (skipclean && preen && sblock.fs_clean) { + if (skipclean && (preen || forceskipclean) && sblock.fs_clean) { pwarn("FILE SYSTEM CLEAN; SKIPPING CHECKS\n"); return (-1); }