summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/hjfs/check.c6
-rw-r--r--sys/src/cmd/hjfs/cons.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/src/cmd/hjfs/check.c b/sys/src/cmd/hjfs/check.c
index edb11b75e..4e540e70c 100644
--- a/sys/src/cmd/hjfs/check.c
+++ b/sys/src/cmd/hjfs/check.c
@@ -16,14 +16,16 @@ checkdir(FLoc *l, Buf *b)
d = getdent(l, b);
for(i = 0; i < d->size; i++){
if(getblk(fsmain, l, b, i, &r, GBREAD) <= 0) {
- dprint("hjfs: directory %s in block %ulld at index %d has a bad block reference at %ulld\n", d->name, l->blk, l->deind, i);
+ dprint("hjfs: directory in block %ulld at index %d has a bad block %ulld at directory index %ulld\n", l->blk, l->deind, r, i);
continue;
}
c = getbuf(fsmain->d, r, TDENTRY, 0);
if(c == nil) {
- dprint("hjfs: directory %s in block %ulld at index %d has a block %ulld that is not a directory entry\n", d->name, l->blk, l->deind, i);
+ dprint("hjfs: directory in block %ulld at index %d has a block %ulld at directory index %ulld that is not a directory entry\n", l->blk, l->deind, r, i);
continue;
}
+ if(chref(fsmain, r, 0) == 0)
+ dprint("hjfs: directory in block %ulld at index %d has a block %ulld at index %ulld whose reference count is 0");
}
}
diff --git a/sys/src/cmd/hjfs/cons.c b/sys/src/cmd/hjfs/cons.c
index e2bff60ba..b8b9278f1 100644
--- a/sys/src/cmd/hjfs/cons.c
+++ b/sys/src/cmd/hjfs/cons.c
@@ -127,7 +127,7 @@ cmdcheck(int, char**)
continue;
}
for(j = 0; j < REFPERBLK; j++, blk++)
- if(b->refs[j] == 0)
+ if(b->refs[j] > 0)
checkblk(blk);
putbuf(b);
}