summaryrefslogtreecommitdiffstats
path: root/src/stat.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2025-02-05 16:52:15 -0500
committerTavian Barnes <tavianator@tavianator.com>2025-02-06 10:38:45 -0500
commit5fee84b972a381301cd78f42e1190115c4bed8a5 (patch)
tree68076b23fabc3d2795cd232fdde17f649cf01a19 /src/stat.h
parenta85565334708840dd44b849a91c1fa09b9038093 (diff)
downloadbfs-5fee84b972a381301cd78f42e1190115c4bed8a5.tar.xz
stat: Expose mount IDs from statx()
Diffstat (limited to 'src/stat.h')
-rw-r--r--src/stat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/stat.h b/src/stat.h
index 50c91de..c4a63d3 100644
--- a/src/stat.h
+++ b/src/stat.h
@@ -14,6 +14,7 @@
#include "bfs.h"
+#include <stdint.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
@@ -56,6 +57,7 @@ enum bfs_stat_field {
BFS_STAT_BTIME = 1 << 11,
BFS_STAT_CTIME = 1 << 12,
BFS_STAT_MTIME = 1 << 13,
+ BFS_STAT_MNT_ID = 1 << 14,
};
/**
@@ -102,6 +104,8 @@ struct bfs_stat {
blkcnt_t blocks;
/** The device ID represented by this file. */
dev_t rdev;
+ /** The ID of the mount point containing this file. */
+ uint64_t mnt_id;
/** Attributes/flags set on the file. */
unsigned long long attrs;
@@ -150,6 +154,11 @@ void bfs_stat_convert(struct bfs_stat *dest, const struct stat *src);
int bfs_statx_flags(enum bfs_stat_flags flags);
/**
+ * Get the default statx() mask.
+ */
+unsigned int bfs_statx_mask(void);
+
+/**
* Convert struct statx to struct bfs_stat.
*/
int bfs_statx_convert(struct bfs_stat *dest, const struct statx *src);