diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2018-12-19 22:37:21 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2018-12-19 22:37:21 -0500 |
commit | 2342fce556e158d2dd5bbdc4b4b5eff8b79b9feb (patch) | |
tree | 03566a7dfec6fa1d127a8d17a375208518ad0336 /parse.c | |
parent | efd9549576f04f4a6fc38ae0de071b25b134e48a (diff) | |
download | bfs-2342fce556e158d2dd5bbdc4b4b5eff8b79b9feb.tar.xz |
parse: Add cost info for -acl and -capable
And set ephemeral_fds correctly too.
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -929,7 +929,9 @@ static struct expr *parse_acl(struct parser_state *state, int flag, int arg2) { #if BFS_HAS_SYS_ACL struct expr *expr = parse_nullary_test(state, eval_acl); if (expr) { - expr->cost = 2*STAT_COST; + expr->cost = STAT_COST; + expr->probability = 0.00002; + expr->ephemeral_fds = 1; } return expr; #else @@ -985,7 +987,9 @@ static struct expr *parse_capable(struct parser_state *state, int flag, int arg2 #if BFS_HAS_POSIX1E_CAPABILITIES struct expr *expr = parse_nullary_test(state, eval_capable); if (expr) { - expr->cost = 2*STAT_COST; + expr->cost = STAT_COST; + expr->probability = 0.000002; + expr->ephemeral_fds = 1; } return expr; #else |