diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2015-06-18 23:35:43 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2015-06-18 23:35:43 -0400 |
commit | ac11476e20136976bf689acf847fdcea4e05e37a (patch) | |
tree | 00479528e76f3af42645635da0fa959f784eecfc /bfs.c | |
parent | 3f7290f5fd7b5c441b35896dfa3333e2f4989ea4 (diff) | |
download | bfs-ac11476e20136976bf689acf847fdcea4e05e37a.tar.xz |
bftw: Add flags parameter and BFTW_STAT flag.
Diffstat (limited to 'bfs.c')
-rw-r--r-- | bfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |