SCCS-vsn: sbin/fsck/main.c 1.21
SCCS-vsn: sbin/icheck/icheck.c 1.17
-static char *sccsid = "@(#)main.c 1.20 (Berkeley) %G%";
+static char *sccsid = "@(#)main.c 1.21 (Berkeley) %G%";
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
#include <ctype.h>
for (c = 0; c < sblock.fs_ncg; c++) {
dbase = cgbase(&sblock, c);
dmax = dbase + sblock.fs_fpg;
for (c = 0; c < sblock.fs_ncg; c++) {
dbase = cgbase(&sblock, c);
dmax = dbase + sblock.fs_fpg;
- if (dmax > sblock.fs_size)
- for ( ; dmax > sblock.fs_size ; dmax--)
+ if (dmax > sblock.fs_size) {
+ for ( ; dmax >= sblock.fs_size ; dmax--)
clrbit(cgrp.cg_free, dmax - dbase);
clrbit(cgrp.cg_free, dmax - dbase);
dmin = sblock.fs_dblkno;
cs = &sblock.fs_cs(&sblock, c);
cgrp.cg_time = time(0);
dmin = sblock.fs_dblkno;
cs = &sblock.fs_cs(&sblock, c);
cgrp.cg_time = time(0);
-static char *sccsid = "@(#)icheck.c 1.16 (Berkeley) %G%";
+static char *sccsid = "@(#)icheck.c 1.17 (Berkeley) %G%";
for (c = 0; c < sblock.fs_ncg; c++) {
dbase = cgbase(&sblock, c);
dmax = dbase + sblock.fs_fpg;
for (c = 0; c < sblock.fs_ncg; c++) {
dbase = cgbase(&sblock, c);
dmax = dbase + sblock.fs_fpg;
- if (dmax > sblock.fs_size)
- for ( ; dmax > sblock.fs_size; dmax--)
+ if (dmax > sblock.fs_size) {
+ for ( ; dmax >= sblock.fs_size; dmax--)
clrbit(cgrp.cg_free, dmax - dbase);
clrbit(cgrp.cg_free, dmax - dbase);
dmin = sblock.fs_dblkno;
cs = &sblock.fs_cs(&sblock, c);
cgrp.cg_time = time(0);
dmin = sblock.fs_dblkno;
cs = &sblock.fs_cs(&sblock, c);
cgrp.cg_time = time(0);