Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jan 2009 00:31:25 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r187749 - stable/7/sbin/fsck_ffs
Message-ID:  <200901270031.n0R0VPOp067902@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue Jan 27 00:31:25 2009
New Revision: 187749
URL: http://svn.freebsd.org/changeset/base/187749

Log:
  MFC r187501 + r187748:
  
  Rename option 'C' to 'D' (damaged).

Modified:
  stable/7/sbin/fsck_ffs/   (props changed)
  stable/7/sbin/fsck_ffs/fsck.h
  stable/7/sbin/fsck_ffs/fsck_ffs.8
  stable/7/sbin/fsck_ffs/fsutil.c
  stable/7/sbin/fsck_ffs/main.c

Modified: stable/7/sbin/fsck_ffs/fsck.h
==============================================================================
--- stable/7/sbin/fsck_ffs/fsck.h	Tue Jan 27 00:29:19 2009	(r187748)
+++ stable/7/sbin/fsck_ffs/fsck.h	Tue Jan 27 00:31:25 2009	(r187749)
@@ -270,7 +270,7 @@ char	yflag;			/* assume a yes response *
 int	bkgrdflag;		/* use a snapshot to run on an active system */
 int	bflag;			/* location of alternate super block */
 int	debug;			/* output debugging info */
-char	catastrophicflag;	/* run in catastrophic mode */
+char	damagedflag;		/* run in damaged mode */
 int	cvtlevel;		/* convert to newer file system format */
 int	bkgrdcheck;		/* determine if background check is possible */
 int	bkgrdsumadj;		/* whether the kernel have ability to adjust superblock summary */

Modified: stable/7/sbin/fsck_ffs/fsck_ffs.8
==============================================================================
--- stable/7/sbin/fsck_ffs/fsck_ffs.8	Tue Jan 27 00:29:19 2009	(r187748)
+++ stable/7/sbin/fsck_ffs/fsck_ffs.8	Tue Jan 27 00:31:25 2009	(r187749)
@@ -29,7 +29,7 @@
 .\"	@(#)fsck.8	8.4 (Berkeley) 5/9/95
 .\" $FreeBSD$
 .\"
-.Dd April 10, 2008
+.Dd January 20, 2009
 .Dt FSCK_FFS 8
 .Os
 .Sh NAME
@@ -38,7 +38,7 @@
 .Nd file system consistency check and interactive repair
 .Sh SYNOPSIS
 .Nm
-.Op Fl BCFpfny
+.Op Fl BDFpfny
 .Op Fl b Ar block
 .Op Fl c Ar level
 .Op Fl m Ar mode
@@ -175,26 +175,6 @@ Use the block specified immediately afte
 the super block for the file system.
 An alternate super block is usually located at block 32 for UFS1,
 and block 160 for UFS2.
-.It Fl C
-Run
-.Nm
-in 'catastrophic recovery' mode, which will enable certain aggressive
-operations that can make
-.Nm
-to survive with file systems that has very serious data damage, which
-is an useful last resort when on disk data damage is very serious
-and causes
-.Nm
-to crash otherwise.  Be
-.Em very careful
-using this flag, it is dangerous if there are data transmission hazards
-because a false positive cylinder group magic number mismatch could
-cause
-.Em irrevertible data loss!
-.Pp
-This option implies the
-.Fl f
-flag.
 .It Fl c
 Convert the file system to the specified level.
 Note that the level of a file system can only be raised.
@@ -228,6 +208,26 @@ are being converted at once.
 The format of a file system can be determined from the
 first line of output from
 .Xr dumpfs 8 .
+.It Fl D
+Run
+.Nm
+in 'damaged recovery' mode, which will enable certain aggressive
+operations that can make
+.Nm
+to survive with file systems that has very serious data damage, which
+is an useful last resort when on disk data damage is very serious
+and causes
+.Nm
+to crash otherwise.  Be
+.Em very careful
+using this flag, it is dangerous if there are data transmission hazards
+because a false positive cylinder group magic number mismatch could
+cause
+.Em irrevertible data loss!
+.Pp
+This option implies the
+.Fl f
+flag.
 .It Fl f
 Force
 .Nm

Modified: stable/7/sbin/fsck_ffs/fsutil.c
==============================================================================
--- stable/7/sbin/fsck_ffs/fsutil.c	Tue Jan 27 00:29:19 2009	(r187748)
+++ stable/7/sbin/fsck_ffs/fsutil.c	Tue Jan 27 00:31:25 2009	(r187749)
@@ -427,7 +427,7 @@ check_cgmagic(int cg, struct cg *cgp)
 
 	if (!cg_chkmagic(cgp)) {
 	    pwarn("CG %d: BAD MAGIC NUMBER\n", cg);
-	    if (catastrophicflag) {
+	    if (damagedflag) {
 		if (reply("CLEAR CG")) {
 			memset(cgp, 0, (size_t)sblock.fs_cgsize);
 			cgp->cg_initediblk = sblock.fs_ipg;
@@ -442,7 +442,7 @@ check_cgmagic(int cg, struct cg *cgp)
 			rerun = 1;
 		}
 	    } else
-		printf("YOU MAY NEED TO RERUN FSCK WITH -C IF IT CRASHED.\n");
+		printf("YOU MAY NEED TO RERUN FSCK WITH -D IF IT CRASHED.\n");
 	}
 }
 

Modified: stable/7/sbin/fsck_ffs/main.c
==============================================================================
--- stable/7/sbin/fsck_ffs/main.c	Tue Jan 27 00:29:19 2009	(r187748)
+++ stable/7/sbin/fsck_ffs/main.c	Tue Jan 27 00:31:25 2009	(r187749)
@@ -81,8 +81,8 @@ main(int argc, char *argv[])
 
 	sync();
 	skipclean = 1;
-	catastrophicflag = 0;
-	while ((ch = getopt(argc, argv, "b:Bc:CdfFm:npy")) != -1) {
+	damagedflag = 0;
+	while ((ch = getopt(argc, argv, "b:Bc:dDfFm:npy")) != -1) {
 		switch (ch) {
 		case 'b':
 			skipclean = 0;
@@ -106,8 +106,8 @@ main(int argc, char *argv[])
 			debug++;
 			break;
 
-		case 'C':
-			catastrophicflag = 1;
+		case 'D':
+			damagedflag = 1;
 			/* FALLTHROUGH */
 
 		case 'f':



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901270031.n0R0VPOp067902>