CVS commit: [netbsd-6-0] src/sbin/fsck_ffs

2013-12-17 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Dec 17 22:33:39 UTC 2013

Modified Files:
src/sbin/fsck_ffs [netbsd-6-0]: inode.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #991):
sbin/fsck_ffs/inode.c: revision 1.70
Fix pasto in the !ufs2 case (use dp-dp1 and not of dp-dp2).
This would be a problem only when allocating a new data block and the
indir block is already allocated, which explains why automated tests didn't
find it.
Problem reported on tech-kern@ and fix tested by manu@.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.64.12.1 src/sbin/fsck_ffs/inode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsck_ffs/inode.c
diff -u src/sbin/fsck_ffs/inode.c:1.64 src/sbin/fsck_ffs/inode.c:1.64.12.1
--- src/sbin/fsck_ffs/inode.c:1.64	Sun Mar  6 17:08:16 2011
+++ src/sbin/fsck_ffs/inode.c	Tue Dec 17 22:33:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: inode.c,v 1.64 2011/03/06 17:08:16 bouyer Exp $	*/
+/*	$NetBSD: inode.c,v 1.64.12.1 2013/12/17 22:33:39 riz Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)inode.c	8.8 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: inode.c,v 1.64 2011/03/06 17:08:16 bouyer Exp $);
+__RCSID($NetBSD: inode.c,v 1.64.12.1 2013/12/17 22:33:39 riz Exp $);
 #endif
 #endif /* not lint */
 
@@ -993,7 +993,7 @@ expandfile(union dinode *dp)
 			dp-dp1.di_ib[ilevel - 1] = iswap32(newblk);
 	} else {
 		ibp = getdatablk(is_ufs2 ? iswap64(dp-dp2.di_ib[ilevel - 1]) :
-		iswap32(dp-dp2.di_ib[ilevel - 1]), sblock-fs_bsize);
+		iswap32(dp-dp1.di_ib[ilevel - 1]), sblock-fs_bsize);
 	}
 	/* walk indirect blocks up to the data block */
 	for (; ilevel 0 ; ilevel--) {



CVS commit: [netbsd-6-0] src/sbin/fsck_ffs

2013-01-13 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jan 13 18:55:41 UTC 2013

Modified Files:
src/sbin/fsck_ffs [netbsd-6-0]: pass1.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #779):
sbin/fsck_ffs/pass1.c: revision 1.50
Show pass1 SIGINFO output on stderr like other passes, not on stdout.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.49.10.1 src/sbin/fsck_ffs/pass1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsck_ffs/pass1.c
diff -u src/sbin/fsck_ffs/pass1.c:1.49 src/sbin/fsck_ffs/pass1.c:1.49.10.1
--- src/sbin/fsck_ffs/pass1.c:1.49	Sun Aug 14 12:32:01 2011
+++ src/sbin/fsck_ffs/pass1.c	Sun Jan 13 18:55:41 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pass1.c,v 1.49 2011/08/14 12:32:01 christos Exp $	*/
+/*	$NetBSD: pass1.c,v 1.49.10.1 2013/01/13 18:55:41 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)pass1.c	8.6 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: pass1.c,v 1.49 2011/08/14 12:32:01 christos Exp $);
+__RCSID($NetBSD: pass1.c,v 1.49.10.1 2013/01/13 18:55:41 bouyer Exp $);
 #endif
 #endif /* not lint */
 
@@ -109,7 +109,8 @@ pass1(void)
 		else
 			inosused = sblock-fs_ipg;
 		if (got_siginfo) {
-			printf(%s: phase 1: cyl group %d of %d (%d%%)\n,
+			fprintf(stderr,
+			%s: phase 1: cyl group %d of %d (%d%%)\n,
 			cdevname(), c, sblock-fs_ncg,
 			c * 100 / sblock-fs_ncg);
 			got_siginfo = 0;