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
commit563e3b7581bf9fe857c88dc0a51f3b454a4ecb57 (patch)
tree270997c0a891ca5b044fa953195049f956a510ca
parente8154523725446b98848e4378f7339502a1d6970 (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)
{