diff options
author | dg <dg@FreeBSD.org> | 1995-02-15 00:17:56 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-02-15 00:17:56 +0000 |
commit | 9c98e6242d4ff0453b3b84875ce8b3999ac89203 (patch) | |
tree | b48f262c6354cbc6843a280222fce8c1f36ce107 /sbin/fsck_ffs/inode.c | |
parent | 783d0964f611ffa89dc07744a9986d0c4d6f03f8 (diff) | |
download | FreeBSD-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_ffs/inode.c')
-rw-r--r-- | sbin/fsck_ffs/inode.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; |