diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-07-17 15:58:37 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-07-17 16:00:54 -0400 |
commit | 812d3efed33e1b04d3f5c661a2bd4c7b8ecaf09d (patch) | |
tree | f10adb6de7b913d930eda3cdd647df48c8297f71 /src | |
parent | d9f7bf31d0693b81bddb7e8c57118dd7f78a2952 (diff) | |
download | bfs-812d3efed33e1b04d3f5c661a2bd4c7b8ecaf09d.tar.xz |
opt: -lname implies -type l
Diffstat (limited to 'src')
-rw-r--r-- | src/opt.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1673,6 +1673,12 @@ static struct bfs_expr *data_flow_links(struct bfs_opt *opt, struct bfs_expr *ex return expr; } +/** Transfer function for -lname. */ +static struct bfs_expr *data_flow_lname(struct bfs_opt *opt, struct bfs_expr *expr, const struct visitor *visitor) { + opt->after_true.types &= 1 << BFS_LNK; + return expr; +} + /** Transfer function for -samefile. */ static struct bfs_expr *data_flow_samefile(struct bfs_opt *opt, struct bfs_expr *expr, const struct visitor *visitor) { struct df_range *true_range = &opt->after_true.ranges[INUM_RANGE]; @@ -1863,6 +1869,7 @@ static const struct visitor data_flow = { {eval_gid, data_flow_gid}, {eval_inum, data_flow_inum}, {eval_links, data_flow_links}, + {eval_lname, data_flow_lname}, {eval_samefile, data_flow_samefile}, {eval_size, data_flow_size}, {eval_type, data_flow_type}, |