]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/stat-util: remove unused null_or_empty_fd()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 Mar 2023 16:44:40 +0000 (18:44 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 Mar 2023 16:44:40 +0000 (18:44 +0200)
src/basic/stat-util.c
src/basic/stat-util.h

index 150605e86d592522c361a5b96f08e48d63058f69..6eaa3da45926b5f417e5a8929df5ad34c5ffacaf 100644 (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;
 
index 4bf15a731d9f8f4401bd6f170b2a27e6ca9deca9..24684d5794ad02bdd7e1d9cd2f55a364081f236c 100644 (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);