diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-02-14 13:09:14 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-02-14 13:09:14 -0500 |
commit | 94432cd2a3185ce97dfd28a6a1b236449d91268f (patch) | |
tree | 3cd2a0943dc029aa0d4188626fb71c9b54a161e6 /parse.c | |
parent | c09c83d321417576eb6c7c3f6222e2ed05110c1c (diff) | |
download | bfs-94432cd2a3185ce97dfd28a6a1b236449d91268f.tar.xz |
"Implement" -noleaf.
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -457,6 +457,19 @@ static struct expr *parse_path(struct parser_state *state, const char *option, b } /** + * Parse -noleaf. + */ +static struct expr *parse_noleaf(struct parser_state *state, const char *option) { + if (state->warn) { + fprintf(stderr, + "bfs does not apply the optimization that %s inhibits.\n\n", + option); + } + + return new_option(state, option); +} + +/** * Parse -samefile FILE. */ static struct expr *parse_samefile(struct parser_state *state, const char *option) { @@ -697,6 +710,8 @@ static struct expr *parse_literal(struct parser_state *state) { return new_option(state, arg); } else if (strcmp(arg, "-nohidden") == 0) { return new_action(state, eval_nohidden); + } else if (strcmp(arg, "-noleaf") == 0) { + return parse_noleaf(state, arg); } else if (strcmp(arg, "-nowarn") == 0) { state->warn = false; return new_positional_option(state); |