diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2018-01-08 21:43:23 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2018-01-08 21:52:50 -0500 |
commit | 50432108fb3ef826301626b94c5e82ad2ab2bd75 (patch) | |
tree | ed8946e5ab8bac5adda495e9c8ca67a8ac99fd19 /expr.h | |
parent | 7d68aac4a50ab4d4881832bc7de568c2b5d4ea8b (diff) | |
download | bfs-50432108fb3ef826301626b94c5e82ad2ab2bd75.tar.xz |
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.
Diffstat (limited to 'expr.h')
-rw-r--r-- | expr.h | 19 |
1 files changed, 3 insertions, 16 deletions
@@ -20,6 +20,7 @@ #include "color.h" #include "exec.h" #include "printf.h" +#include "stat.h" #include <regex.h> #include <stdbool.h> #include <stddef.h> @@ -73,20 +74,6 @@ enum mode_cmp { }; /** - * Available struct stat time fields. - */ -enum time_field { - /** Access time. */ - ATIME, - /** Status change time. */ - CTIME, - /** Modification time. */ - MTIME, - /** Birth time. */ - BTIME, -}; - -/** * Possible time units. */ enum time_unit { @@ -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; |