From 2342fce556e158d2dd5bbdc4b4b5eff8b79b9feb Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 19 Dec 2018 22:37:21 -0500 Subject: parse: Add cost info for -acl and -capable And set ephemeral_fds correctly too. --- parse.c | 8 ++++++-- 1 file 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 -- cgit v1.2.3