From ff87f3cdf1e3c5a7d4661e785f4d96be9d59291c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 4 Feb 2016 17:18:16 -0500 Subject: Implement -inum. --- eval.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 33da8e4..a60bd30 100644 --- a/eval.c +++ b/eval.c @@ -272,6 +272,18 @@ bool eval_nohidden(const struct expr *expr, struct eval_state *state) { } } +/** + * -inum test. + */ +bool eval_inum(const struct expr *expr, struct eval_state *state) { + const struct stat *statbuf = fill_statbuf(state); + if (!statbuf) { + return false; + } + + return do_cmp(expr, statbuf->st_ino); +} + /** * -name test. */ -- cgit v1.2.3