stat-util: expose fd_is_read_only_fs()

Currently it is not used, but the fucntion is already quite generic and
useful.
This commit is contained in:
Yu Watanabe
2024-03-14 23:45:27 +08:00
committed by Mike Yuan
parent 2c75cb8b51
commit d30d44883f
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -239,7 +239,7 @@ int null_or_empty_path_with_root(const char *fn, const char *root) {
return null_or_empty(&st);
}
static int fd_is_read_only_fs(int fd) {
int fd_is_read_only_fs(int fd) {
struct statvfs st;
assert(fd >= 0);
+1
View File
@@ -45,6 +45,7 @@ static inline int null_or_empty_path(const char *fn) {
return null_or_empty_path_with_root(fn, NULL);
}
int fd_is_read_only_fs(int fd);
int path_is_read_only_fs(const char *path);
int inode_same_at(int fda, const char *filea, int fdb, const char *fileb, int flags);