summaryrefslogtreecommitdiffstats
path: root/sbin
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
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')
-rw-r--r--sbin/fsck/inode.c7
-rw-r--r--sbin/fsck_ffs/inode.c7
-rw-r--r--sbin/fsck_ifs/inode.c7
3 files changed, 15 insertions, 6 deletions
diff --git a/sbin/fsck/inode.c b/sbin/fsck/inode.c
index 381bfc0..56b978f 100644
--- a/sbin/fsck/inode.c
+++ b/sbin/fsck/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;
diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c
index 381bfc0..56b978f 100644
--- a/sbin/fsck_ffs/inode.c
+++ b/sbin/fsck_ffs/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;
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