reinitialize dup list head and zero link count head to empty after each fs check
SCCS-vsn: sbin/fsck/pass4.c 5.2
SCCS-vsn: sbin/fsck/main.c 5.4
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)main.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 5.4 (Berkeley) %G%";
#endif not lint
#include <sys/param.h>
#endif not lint
#include <sys/param.h>
{
daddr_t n_ffree, n_bfree;
struct dups *dp;
{
daddr_t n_ffree, n_bfree;
struct dups *dp;
devname = filesys;
if (setup(filesys) == 0) {
devname = filesys;
if (setup(filesys) == 0) {
printf(" %d,", dp->dup);
printf("\n");
}
printf(" %d,", dp->dup);
printf("\n");
}
+ if (zlnhead != NULL) {
+ printf("The following zero link count inodes remain:");
+ for (zlnp = zlnhead; zlnp; zlnp = zlnp->next)
+ printf(" %d,", zlnp->zlncnt);
+ printf("\n");
+ }
+ zlnhead = (struct zlncnt *)0;
+ duplist = (struct dups *)0;
if (dfile.mod) {
(void)time(&sblock.fs_time);
sbdirty();
if (dfile.mod) {
(void)time(&sblock.fs_time);
sbdirty();
-static char sccsid[] = "@(#)pass4.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)pass4.c 5.2 (Berkeley) %G%";
#endif not lint
#include <sys/param.h>
#endif not lint
#include <sys/param.h>
else {
for (zlnp = zlnhead; zlnp; zlnp = zlnp->next)
if (zlnp->zlncnt == inumber) {
else {
for (zlnp = zlnhead; zlnp; zlnp = zlnp->next)
if (zlnp->zlncnt == inumber) {
+ zlnp->zlncnt = zlnhead->zlncnt;
+ zlnp = zlnhead;
+ zlnhead = zlnhead->next;
+ free(zlnp);
clri(&idesc, "UNREF", 1);
break;
}
clri(&idesc, "UNREF", 1);
break;
}
dlp->dup = duplist->dup;
dlp = duplist;
duplist = duplist->next;
dlp->dup = duplist->dup;
dlp = duplist;
duplist = duplist->next;