From 5fee84b972a381301cd78f42e1190115c4bed8a5 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 5 Feb 2025 16:52:15 -0500 Subject: stat: Expose mount IDs from statx() --- src/stat.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/stat.h') 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 #include #include #include @@ -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; @@ -149,6 +153,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. */ -- cgit v1.2.3