Date: Wed, 11 Nov 1998 18:40:01 -0800 (PST) From: Don Lewis <Don.Lewis@tsc.tdk.com> To: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/8055 Message-ID: <199811120240.SAA05082@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/8055; it has been noted by GNATS.
From: Don Lewis <Don.Lewis@tsc.tdk.com>
To: bug-followup@freebsd.org
Cc: Subject: Re: bin/8055
Date: Wed, 11 Nov 1998 18:29:07 -0800 (PST)
The patches submitted with this PR have been incorporated with fixes
into Kirk McKusick's 1998-10-08 13:19 PDT version of fsck. This should
be imported into the tree with the following patch.
--- fsck/inode.c.orig Fri Oct 23 20:09:43 1998
+++ fsck/inode.c Fri Oct 23 20:15:09 1998
@@ -520,6 +520,7 @@
register struct dinode *dp;
register char *p;
struct passwd *pw;
+ time_t t;
char *ctime();
printf(" I=%lu ", ino);
@@ -535,7 +536,8 @@
if (preen)
printf("%s: ", cdevname);
printf("SIZE=%qu ", dp->di_size);
- p = ctime(&dp->di_mtime.tv_sec);
+ t = dp->di_mtime;
+ p = ctime(&t);
printf("MTIME=%12.12s %4.4s ", &p[4], &p[20]);
}
@@ -617,8 +619,9 @@
}
dp->di_mode = type;
dp->di_flags = 0;
- (void)time(&dp->di_atime.tv_sec);
+ dp->di_atime = time(NULL);
dp->di_mtime = dp->di_ctime = dp->di_atime;
+ dp->di_mtimensec = dp->di_ctimensec = dp->di_atimensec = 0;
dp->di_size = sblock.fs_fsize;
dp->di_blocks = btodb(sblock.fs_fsize);
n_files++;
--- fsck/pass3.c.orig Fri Oct 23 20:09:56 1998
+++ fsck/pass3.c Fri Oct 23 03:00:33 1998
@@ -84,9 +84,9 @@
if (linkup(orphan, inp->i_dotdot, NULL)) {
inp->i_parent = inp->i_dotdot = lfdir;
inoinfo(lfdir)->ino_linkcnt--;
- inoinfo(orphan)->ino_state = DFOUND;
- propagate();
}
+ inoinfo(orphan)->ino_state = DFOUND;
+ propagate();
continue;
}
pfatal("ORPHANED DIRECTORY LOOP DETECTED I=%lu", orphan);
@@ -106,8 +106,8 @@
inoinfo(orphan)->ino_linkcnt++;
inp->i_parent = inp->i_dotdot = lfdir;
inoinfo(lfdir)->ino_linkcnt--;
- inoinfo(orphan)->ino_state = DFOUND;
- propagate();
}
+ inoinfo(orphan)->ino_state = DFOUND;
+ propagate();
}
}
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811120240.SAA05082>
