stat-util: introduce path_is_network_fs()

This commit is contained in:
Yu Watanabe
2022-02-04 15:22:20 +09:00
parent 318a53d10a
commit 4e247216e5
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -249,6 +249,15 @@ int path_is_temporary_fs(const char *path) {
return is_temporary_fs(&s);
}
int path_is_network_fs(const char *path) {
struct statfs s;
if (statfs(path, &s) < 0)
return -errno;
return is_network_fs(&s);
}
int stat_verify_regular(const struct stat *st) {
assert(st);