Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sbin/fsck_ffs pullup changes between 1.26 and 1.27
details: https://anonhg.NetBSD.org/src/rev/29b07f54181d
branches: netbsd-1-4
changeset: 470869:29b07f54181d
user: castor <castor%NetBSD.org@localhost>
date: Tue Aug 22 15:19:05 2000 +0000
description:
pullup changes between 1.26 and 1.27
revision 1.27
date: 2000/08/03 14:52:39; author: castor; state: Exp; lines: +12 -2
Fix an evil ugly bug which causes files placed into lost+found
to be inconsistent, and unremovable. From Ethan Solomita
<ethan%geocast.com@localhost>. Reviewed by fvdl.
pullup requested by Haavard Eidnes -- assuming that this was actually a
request from releng-1-4.
diffstat:
sbin/fsck_ffs/dir.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (49 lines):
diff -r dc4b79c10dcb -r 29b07f54181d sbin/fsck_ffs/dir.c
--- a/sbin/fsck_ffs/dir.c Sun Aug 20 22:30:43 2000 +0000
+++ b/sbin/fsck_ffs/dir.c Tue Aug 22 15:19:05 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.25 1998/03/18 17:01:23 bouyer Exp $ */
+/* $NetBSD: dir.c,v 1.25.2.1 2000/08/22 15:19:05 castor Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: dir.c,v 1.25 1998/03/18 17:01:23 bouyer Exp $");
+__RCSID("$NetBSD: dir.c,v 1.25.2.1 2000/08/22 15:19:05 castor Exp $");
#endif
#endif /* not lint */
@@ -94,6 +94,13 @@
inpend = &inpsort[inplast];
for (inpp = inpsort; inpp < inpend; inpp++) {
inp = *inpp;
+ inp->i_child = inp->i_sibling = inp->i_parentp = 0;
+ if (statemap[inp->i_number] == DFOUND)
+ statemap[inp->i_number] = DSTATE;
+ }
+
+ for (inpp = inpsort; inpp < inpend; inpp++) {
+ inp = *inpp;
if (inp->i_parent == 0 ||
inp->i_number == ROOTINO)
continue;
@@ -683,6 +690,7 @@
ino_t parent, request;
int mode;
{
+ struct inoinfo *inp;
ino_t ino;
char *cp;
struct dinode *dp;
@@ -727,6 +735,8 @@
return (0);
}
cacheino(dp, ino);
+ inp = getinoinfo(ino);
+ inp->i_parent = inp->i_dotdot = parent;
statemap[ino] = statemap[parent];
if (statemap[ino] == DSTATE) {
lncntp[ino] = iswap16(dp->di_nlink);
Home |
Main Index |
Thread Index |
Old Index