summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-10-17 20:37:08 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-10-17 20:37:08 +0000
commit53cfa287f777ab33bf94496a46fd4570667b3703 (patch)
treead86665d9ba01afc3833dda7a0427093526d31e9
parent20bc9b801818cad5fd7d0ff47ce7427bf256e2ed (diff)
Formerly pass2.c.~8~
-rw-r--r--ufs-fsck/pass2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ufs-fsck/pass2.c b/ufs-fsck/pass2.c
index 19d8ba8c..a261ff1d 100644
--- a/ufs-fsck/pass2.c
+++ b/ufs-fsck/pass2.c
@@ -266,6 +266,7 @@ pass2 ()
datablocks_iterate (&dino, checkdirblock);
}
+
/* At this point for each directory:
If this directory is an entry in another directory, then i_parent is
set to that node's number.
@@ -277,6 +278,11 @@ pass2 ()
if (dnp->i_isize == 0)
continue;
+ /* Root is considered to be its own parent even though it isn't
+ listed. */
+ if (dnp->i_number == ROOTINO && !dnp->i_parent)
+ dnp->i_parent = ROOTINO;
+
/* Check `..' to make sure it exists and is correct */
if (dnp->i_parent && dnp->i_dotdot == 0)
{