summaryrefslogtreecommitdiffstats
path: root/expr.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2018-01-08 21:43:23 -0500
committerTavian Barnes <tavianator@tavianator.com>2018-01-08 21:52:50 -0500
commit50432108fb3ef826301626b94c5e82ad2ab2bd75 (patch)
treeed8946e5ab8bac5adda495e9c8ca67a8ac99fd19 /expr.h
parent7d68aac4a50ab4d4881832bc7de568c2b5d4ea8b (diff)
downloadbfs-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.h19
1 files changed, 3 insertions, 16 deletions
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 <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;