From ac11476e20136976bf689acf847fdcea4e05e37a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 18 Jun 2015 23:35:43 -0400 Subject: bftw: Add flags parameter and BFTW_STAT flag. --- bfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bfs.c') diff --git a/bfs.c b/bfs.c index 7a7b789..6c0e07c 100644 --- a/bfs.c +++ b/bfs.c @@ -20,7 +20,7 @@ typedef struct { bool hidden; } options; -static int callback(const char *fpath, int typeflag, void *ptr) { +static int callback(const char *fpath, const struct stat *sb, int typeflag, void *ptr) { const options *opts = ptr; const char *filename = strrchr(fpath, '/'); @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) { } // TODO: getrlimit(RLIMIT_NOFILE) - if (bftw(opts.path, callback, 1024, &opts) != 0) { + if (bftw(opts.path, callback, 1024, 0, &opts) != 0) { perror("bftw()"); return EXIT_FAILURE; } -- cgit v1.2.3