diff options
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -342,6 +342,18 @@ bool eval_quit(const struct expr *expr, struct eval_state *state) { } /** + * -samefile test. + */ +bool eval_samefile(const struct expr *expr, struct eval_state *state) { + const struct stat *statbuf = fill_statbuf(state); + if (!statbuf) { + return false; + } + + return statbuf->st_dev == expr->dev && statbuf->st_ino == expr->ino; +} + +/** * -type test. */ bool eval_type(const struct expr *expr, struct eval_state *state) { |