diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-02-04 17:18:16 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-02-04 17:18:16 -0500 |
commit | ff87f3cdf1e3c5a7d4661e785f4d96be9d59291c (patch) | |
tree | c08ec3fb6ba60ce424dc3ef81671981ceed824fa /eval.c | |
parent | d696346689e161ee8a5623182ed65ab119adb203 (diff) | |
download | bfs-ff87f3cdf1e3c5a7d4661e785f4d96be9d59291c.tar.xz |
Implement -inum.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -273,6 +273,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. */ bool eval_name(const struct expr *expr, struct eval_state *state) { |