stat-util: Add is_fs_type_at()
This commit is contained in:
@@ -48,8 +48,13 @@ static inline int inode_same(const char *filea, const char *fileb, int flags) {
|
||||
typedef typeof(((struct statfs*)NULL)->f_type) statfs_f_type_t;
|
||||
|
||||
bool is_fs_type(const struct statfs *s, statfs_f_type_t magic_value) _pure_;
|
||||
int fd_is_fs_type(int fd, statfs_f_type_t magic_value);
|
||||
int path_is_fs_type(const char *path, statfs_f_type_t magic_value);
|
||||
int is_fs_type_at(int dir_fd, const char *path, statfs_f_type_t magic_value);
|
||||
static inline int fd_is_fs_type(int fd, statfs_f_type_t magic_value) {
|
||||
return is_fs_type_at(fd, NULL, magic_value);
|
||||
}
|
||||
static inline int path_is_fs_type(const char *path, statfs_f_type_t magic_value) {
|
||||
return is_fs_type_at(AT_FDCWD, path, magic_value);
|
||||
}
|
||||
|
||||
bool is_temporary_fs(const struct statfs *s) _pure_;
|
||||
bool is_network_fs(const struct statfs *s) _pure_;
|
||||
|
||||
Reference in New Issue
Block a user