summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2018-12-19 22:37:21 -0500
committerTavian Barnes <tavianator@tavianator.com>2018-12-19 22:37:21 -0500
commit2342fce556e158d2dd5bbdc4b4b5eff8b79b9feb (patch)
tree03566a7dfec6fa1d127a8d17a375208518ad0336
parentefd9549576f04f4a6fc38ae0de071b25b134e48a (diff)
downloadbfs-2342fce556e158d2dd5bbdc4b4b5eff8b79b9feb.tar.xz
parse: Add cost info for -acl and -capable
And set ephemeral_fds correctly too.
-rw-r--r--parse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 554d56b..80660fd 100644
--- a/parse.c
+++ b/parse.c
@@ -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