From d77705b6d872e99ed9c1fe6ed1a27d8678cf7117 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 3 Dec 1998 02:41:11 +0000 Subject: Cosmetic and documentation changes brought from earlier FreeBSD versions. (e.g. RCS Id:) --- sbin/fsck_ffs/dir.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sbin/fsck_ffs/dir.c') diff --git a/sbin/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c index ceb66e6..71e8a05b 100644 --- a/sbin/fsck_ffs/dir.c +++ b/sbin/fsck_ffs/dir.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static const char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95"; +#endif +static const char rcsid[] = + "$Id: dir.c,v 1.12 1998/09/23 05:37:35 nate Exp $"; #endif /* not lint */ #include @@ -519,6 +523,13 @@ linkup(orphan, parentdir, name) pwarn("DIR I=%lu CONNECTED. ", orphan); if (parentdir != (ino_t)-1) { printf("PARENT WAS I=%lu\n", (u_long)parentdir); + /* + * The parent directory, because of the ordering + * guarantees, has had the link count incremented + * for the child, but no entry was made. This + * fixes the parent link count so that fsck does + * not need to be rerun. + */ inoinfo(parentdir)->ino_linkcnt++; } if (preen == 0) -- cgit v1.1