From c454a90431c9ef451f30be2dcf594c0918c2f3c4 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 18 Oct 1994 18:26:16 +0000 Subject: Formerly pass5.c.~7~ --- ufs-fsck/pass5.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ufs-fsck') diff --git a/ufs-fsck/pass5.c b/ufs-fsck/pass5.c index e3547da1..84c37285 100644 --- a/ufs-fsck/pass5.c +++ b/ufs-fsck/pass5.c @@ -221,9 +221,11 @@ pass5 () /* Walk through each inode, accounting for it in the inode map and in newcg->cg_cs. */ + /* In this loop, J is the inode number, and I is the + inode number relative to this CG. */ j = sblock->fs_ipg * c; for (i = 0; i < sblock->fs_ipg; j++, i++) - switch (inodestate[i]) + switch (inodestate[j]) { case DIRECTORY: case DIRECTORY | DIR_REF: @@ -238,7 +240,7 @@ pass5 () break; default: - errexit ("UNKNOWN STATE I=%d", i); + errexit ("UNKNOWN STATE I=%d", j); } /* Account for inodes 0 and 1 */ if (c == 0) @@ -250,6 +252,8 @@ pass5 () /* Walk through each data block, accounting for it in the block map and in newcg->cg_cs. */ + /* In this look, D is the block number and I is the + block number relative to this CG. */ for (i = 0, d = dbase; d < dmax; d += sblock->fs_frag, i += sblock->fs_frag) -- cgit v1.2.3