summaryrefslogtreecommitdiffstats
path: root/bfs.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2015-06-18 23:35:43 -0400
committerTavian Barnes <tavianator@tavianator.com>2015-06-18 23:35:43 -0400
commitac11476e20136976bf689acf847fdcea4e05e37a (patch)
tree00479528e76f3af42645635da0fa959f784eecfc /bfs.c
parent3f7290f5fd7b5c441b35896dfa3333e2f4989ea4 (diff)
downloadbfs-ac11476e20136976bf689acf847fdcea4e05e37a.tar.xz
bftw: Add flags parameter and BFTW_STAT flag.
Diffstat (limited to 'bfs.c')
-rw-r--r--bfs.c4
1 files changed, 2 insertions, 2 deletions
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;
}