From fb7a61add741b28ae6c91787373bdb544b2e751b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 17 Dec 2018 22:05:49 -0500 Subject: Add new -capable test --- eval.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'eval.c') diff --git a/eval.c b/eval.c index a170967..44e4a6d 100644 --- a/eval.c +++ b/eval.c @@ -196,6 +196,13 @@ bool eval_access(const struct expr *expr, struct eval_state *state) { return xfaccessat(ftwbuf->at_fd, ftwbuf->at_path, expr->idata) == 0; } +/** + * -capable test. + */ +bool eval_capable(const struct expr *expr, struct eval_state *state) { + return bfs_check_capabilities(state->ftwbuf); +} + /** * Get the given timespec field out of a stat buffer. */ -- cgit v1.2.3