summaryrefslogtreecommitdiff
path: root/ufs-fsck/pass5.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-10-18 18:26:16 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-10-18 18:26:16 +0000
commitc454a90431c9ef451f30be2dcf594c0918c2f3c4 (patch)
tree051225ef13f34d64514656054093a022b26c273d /ufs-fsck/pass5.c
parentcceb27712cf388aeaf9512ffffe4a0a1cbaea7e2 (diff)
Formerly pass5.c.~7~
Diffstat (limited to 'ufs-fsck/pass5.c')
-rw-r--r--ufs-fsck/pass5.c8
1 files changed, 6 insertions, 2 deletions
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)