Since this is limited to ffs, use ufsinfo_t instead of ino_t.
authorguenther <guenther@openbsd.org>
Tue, 13 May 2014 05:50:24 +0000 (05:50 +0000)
committerguenther <guenther@openbsd.org>
Tue, 13 May 2014 05:50:24 +0000 (05:50 +0000)
commitfb9a00c4886a50c2cf6d09c761dc72cdc3530214
treed0153b250bea63199d1c5fd552fec1fbeef1492d
parent654cc61aff1e91002a09d2e23d99e87bf7403f90
Since this is limited to ffs, use ufsinfo_t instead of ino_t.
Grow the array of cached inodes exponentially instead of arithmetically.
Prefer sizeof(*pointer) over sizeof(type) in mallocs.
Don't leak memory in searchdir().
Fix multiple bugs in the handling of indirect blocks, including reuse of
a static buffer in a recursive function and failure to track the remaining
size of the directory blocks to process

Tested with a directory *doubly* indirect block!
ok krw@
sbin/ncheck_ffs/ncheck_ffs.c