X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/blobdiff_plain/14601b5d4222f2bee568e03eddf2f949b2a9d126..09fd761910218169867abf96b15d3cc1bc36e379:/du.h diff --git a/du.h b/du.h index c0b73e8..670c572 100644 --- a/du.h +++ b/du.h @@ -18,7 +18,14 @@ typedef int (*gotdata_fn_t)(void *ctx, const struct stat64 *st); /* + * Function called to report an error during scanning. The ctx is + * the same one passed to gotdata_fn_t. + */ +typedef void (*err_fn_t)(void *vctx, const char *fmt, ...); + +/* * Recursively scan a directory tree and report every * space-consuming item in it to gotdata(). */ -void du(const char *path, gotdata_fn_t gotdata, void *gotdata_ctx); +void du(const char *path, gotdata_fn_t gotdata, err_fn_t err, + void *gotdata_ctx);