Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sbin/fsck_ffs Pullup changes between 1.26 and 1.27 from...
details: https://anonhg.NetBSD.org/src/rev/96848ed9138e
branches: netbsd-1-5
changeset: 488864:96848ed9138e
user: castor <castor%NetBSD.org@localhost>
date: Thu Aug 03 17:05:51 2000 +0000
description:
Pullup changes between 1.26 and 1.27 from -current.
Requested by castor. Approved by thorpej.
> 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.
diffstat:
sbin/fsck_ffs/dir.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (49 lines):
diff -r 3a7a52cfb309 -r 96848ed9138e sbin/fsck_ffs/dir.c
--- a/sbin/fsck_ffs/dir.c Thu Aug 03 14:53:06 2000 +0000
+++ b/sbin/fsck_ffs/dir.c Thu Aug 03 17:05:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.26 1999/11/15 19:18:24 fvdl Exp $ */
+/* $NetBSD: dir.c,v 1.26.4.1 2000/08/03 17:05:51 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.26 1999/11/15 19:18:24 fvdl Exp $");
+__RCSID("$NetBSD: dir.c,v 1.26.4.1 2000/08/03 17:05:51 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;
@@ -687,6 +694,7 @@
ino_t parent, request;
int mode;
{
+ struct inoinfo *inp;
ino_t ino;
char *cp;
struct dinode *dp;
@@ -731,6 +739,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