basic/stat-util: add null_or_empty_path_with_root()

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-03-29 15:07:05 +02:00
parent 9825181143
commit 48542eac39
3 changed files with 39 additions and 6 deletions
+5 -1
View File
@@ -31,9 +31,13 @@ static inline int dir_is_populated(const char *path) {
}
bool null_or_empty(struct stat *st) _pure_;
int null_or_empty_path(const char *fn);
int null_or_empty_path_with_root(const char *fn, const char *root);
int null_or_empty_fd(int fd);
static inline int null_or_empty_path(const char *fn) {
return null_or_empty_path_with_root(fn, NULL);
}
int path_is_read_only_fs(const char *path);
int files_same(const char *filea, const char *fileb, int flags);