summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ifs
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-02-15 00:17:56 +0000
committerdg <dg@FreeBSD.org>1995-02-15 00:17:56 +0000
commit9c98e6242d4ff0453b3b84875ce8b3999ac89203 (patch)
treeb48f262c6354cbc6843a280222fce8c1f36ce107 /sbin/fsck_ifs
parent783d0964f611ffa89dc07744a9986d0c4d6f03f8 (diff)
downloadFreeBSD-src-9c98e6242d4ff0453b3b84875ce8b3999ac89203.zip
FreeBSD-src-9c98e6242d4ff0453b3b84875ce8b3999ac89203.tar.gz
>The fix for the missing ".." in the root directory is enclosed below.
Submitted by: Kirk McKusick
Diffstat (limited to 'sbin/fsck_ifs')
-rw-r--r--sbin/fsck_ifs/inode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/fsck_ifs/inode.c b/sbin/fsck_ifs/inode.c
index 381bfc0..56b978f 100644
--- a/sbin/fsck_ifs/inode.c
+++ b/sbin/fsck_ifs/inode.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)inode.c 8.4 (Berkeley) 4/18/94";
+static char sccsid[] = "@(#)inode.c 8.5 (Berkeley) 2/8/95";
#endif /* not lint */
#include <sys/param.h>
@@ -311,7 +311,10 @@ cacheino(dp, inumber)
inpp = &inphead[inumber % numdirs];
inp->i_nexthash = *inpp;
*inpp = inp;
- inp->i_parent = (ino_t)0;
+ if (inumber == ROOTINO)
+ inp->i_parent = ROOTINO;
+ else
+ inp->i_parent = (ino_t)0;
inp->i_dotdot = (ino_t)0;
inp->i_number = inumber;
inp->i_isize = dp->di_size;
OpenPOWER on IntegriCloud