1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-15 05:57:26 +03:00

basic/stat-util: remove unused null_or_empty_fd()

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-03-28 18:44:40 +02:00
parent 9db7081d83
commit 3e2d735328
2 changed files with 0 additions and 12 deletions

View File

@ -152,17 +152,6 @@ int null_or_empty_path_with_root(const char *fn, const char *root) {
return null_or_empty(&st);
}
int null_or_empty_fd(int fd) {
struct stat st;
assert(fd >= 0);
if (fstat(fd, &st) < 0)
return -errno;
return null_or_empty(&st);
}
static int fd_is_read_only_fs(int fd) {
struct statvfs st;

View File

@ -30,7 +30,6 @@ static inline int dir_is_empty(const char *path, bool ignore_hidden_or_backup) {
bool null_or_empty(struct stat *st) _pure_;
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);