From owner-svn-src-stable@FreeBSD.ORG Tue Mar 24 02:28:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A14F1106566B; Tue, 24 Mar 2009 02:28:47 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73C548FC18; Tue, 24 Mar 2009 02:28:47 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2O2SlrX029745; Tue, 24 Mar 2009 02:28:47 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2O2Slgr029742; Tue, 24 Mar 2009 02:28:47 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200903240228.n2O2Slgr029742@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 24 Mar 2009 02:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190361 - stable/7/sbin/fsck X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2009 02:28:48 -0000 Author: obrien Date: Tue Mar 24 02:28:46 2009 New Revision: 190361 URL: http://svn.freebsd.org/changeset/base/190361 Log: Revert r190357, in which I was just trying to get the merge info set at the src level. (turns out svn+ssh://obrien@svn.freebsd.org/base/head and svn+ssh://svn.freebsd.org/base/stable/7 are seen as two totally different repositories... Jeez subversion can be dumb...) Modified: stable/7/sbin/fsck/fsck.8 stable/7/sbin/fsck/fsck.c stable/7/sbin/fsck/fsutil.h Modified: stable/7/sbin/fsck/fsck.8 ============================================================================== --- stable/7/sbin/fsck/fsck.8 Tue Mar 24 02:09:48 2009 (r190360) +++ stable/7/sbin/fsck/fsck.8 Tue Mar 24 02:28:46 2009 (r190361) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2001 +.Dd January 25, 2009 .Dt FSCK 8 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd file system consistency check and interactive repair .Sh SYNOPSIS .Nm -.Op Fl dfnpvy +.Op Fl Cdfnpvy .Op Fl B | F .Op Fl T Ar fstype : Ns Ar fsoptions .Op Fl t Ar fstype @@ -112,6 +112,11 @@ to be the partition and slice designator .Pp The options are as follows: .Bl -tag -width indent +.It Fl C +Check if the +.Dq clean +flag is set in the superblock and skip file system checks if file system was +properly dismounted and marked clean. .It Fl d Debugging mode. Just print the commands without executing them. Modified: stable/7/sbin/fsck/fsck.c ============================================================================== --- stable/7/sbin/fsck/fsck.c Tue Mar 24 02:09:48 2009 (r190360) +++ stable/7/sbin/fsck/fsck.c Tue Mar 24 02:28:46 2009 (r190361) @@ -103,7 +103,7 @@ main(int argc, char *argv[]) TAILQ_INIT(&selhead); TAILQ_INIT(&opthead); - while ((i = getopt(argc, argv, "BdvpfFnyl:t:T:")) != -1) + while ((i = getopt(argc, argv, "BCdvpfFnyl:t:T:")) != -1) switch (i) { case 'B': if (flags & CHECK_BACKGRD) @@ -128,6 +128,9 @@ main(int argc, char *argv[]) case 'p': flags |= CHECK_PREEN; /*FALLTHROUGH*/ + case 'C': + flags |= CHECK_CLEAN; + /*FALLTHROUGH*/ case 'n': case 'y': globopt[1] = i; @@ -566,7 +569,7 @@ static void usage(void) { static const char common[] = - "[-dfnpvy] [-B | -F] [-T fstype:fsoptions] [-t fstype]"; + "[-Cdfnpvy] [-B | -F] [-T fstype:fsoptions] [-t fstype]"; (void)fprintf(stderr, "usage: %s %s [special | node] ...\n", getprogname(), common); Modified: stable/7/sbin/fsck/fsutil.h ============================================================================== --- stable/7/sbin/fsck/fsutil.h Tue Mar 24 02:09:48 2009 (r190360) +++ stable/7/sbin/fsck/fsutil.h Tue Mar 24 02:28:46 2009 (r190361) @@ -48,6 +48,7 @@ char *estrdup(const char *); #define CHECK_DEBUG 0x0004 #define CHECK_BACKGRD 0x0008 #define DO_BACKGRD 0x0010 +#define CHECK_CLEAN 0x0020 struct fstab; int checkfstab(int, int (*)(struct fstab *),