summaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/pass4.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2020-12-18 23:28:27 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2020-12-18 23:28:27 +0000
commit7180f1ab40e22f3f6b8d50d05c6ae186de54e90a (patch)
tree42194631eb560d0174334c567a397b741f6557ac /sbin/fsck_ffs/pass4.c
parent673e2dd652156342009930cf1f7d15623e4a543a (diff)
downloadsrc-test2-7180f1ab40e22f3f6b8d50d05c6ae186de54e90a.tar.gz
src-test2-7180f1ab40e22f3f6b8d50d05c6ae186de54e90a.zip
Notes
Diffstat (limited to 'sbin/fsck_ffs/pass4.c')
-rw-r--r--sbin/fsck_ffs/pass4.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/sbin/fsck_ffs/pass4.c b/sbin/fsck_ffs/pass4.c
index f48bc041af10..925be9f4fb4a 100644
--- a/sbin/fsck_ffs/pass4.c
+++ b/sbin/fsck_ffs/pass4.c
@@ -58,7 +58,7 @@ pass4(void)
memset(&idesc, 0, sizeof(struct inodesc));
idesc.id_type = ADDR;
- idesc.id_func = pass4check;
+ idesc.id_func = freeblock;
for (cg = 0; cg < sblock.fs_ncg; cg++) {
if (got_siginfo) {
printf("%s: phase 4: cyl group %d of %d (%d%%)\n",
@@ -124,32 +124,3 @@ pass4(void)
}
}
}
-
-int
-pass4check(struct inodesc *idesc)
-{
- struct dups *dlp;
- int nfrags, res = KEEPON;
- ufs2_daddr_t blkno = idesc->id_blkno;
-
- for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) {
- if (chkrange(blkno, 1)) {
- res = SKIP;
- } else if (testbmap(blkno)) {
- for (dlp = duplist; dlp; dlp = dlp->next) {
- if (dlp->dup != blkno)
- continue;
- dlp->dup = duplist->dup;
- dlp = duplist;
- duplist = duplist->next;
- free((char *)dlp);
- break;
- }
- if (dlp == NULL) {
- clrbmap(blkno);
- n_blks--;
- }
- }
- }
- return (res);
-}