From 50432108fb3ef826301626b94c5e82ad2ab2bd75 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 8 Jan 2018 21:43:23 -0500 Subject: stat: New wrapper around the stat() family This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times. --- expr.h | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'expr.h') diff --git a/expr.h b/expr.h index 5eff72f..9644a0d 100644 --- a/expr.h +++ b/expr.h @@ -20,6 +20,7 @@ #include "color.h" #include "exec.h" #include "printf.h" +#include "stat.h" #include #include #include @@ -72,20 +73,6 @@ enum mode_cmp { MODE_ANY, }; -/** - * Available struct stat time fields. - */ -enum time_field { - /** Access time. */ - ATIME, - /** Status change time. */ - CTIME, - /** Modification time. */ - MTIME, - /** Birth time. */ - BTIME, -}; - /** * Possible time units. */ @@ -160,10 +147,10 @@ struct expr { /** Mode to use for directories (different due to X). */ mode_t dir_mode; + /** The optional stat field to look at. */ + enum bfs_stat_field stat_field; /** The optional reference time. */ struct timespec reftime; - /** The optional time field. */ - enum time_field time_field; /** The optional time unit. */ enum time_unit time_unit; -- cgit v1.2.3