aboutsummaryrefslogtreecommitdiffstats
path: root/lib/path.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2019-04-11 13:11:53 +0200
committerKarel Zak <kzak@redhat.com>2019-04-11 13:11:53 +0200
commit7761bd3bb6c56a375ad8d027c20d020aaa33e2d8 (patch)
tree1c5a07da00a32e8b6dbde0eef1500f48ef340af2 /lib/path.c
parent146900d41166efc375d69d7a51f9675dba684f6a (diff)
downloadutil-linux-7761bd3bb6c56a375ad8d027c20d020aaa33e2d8.tar.gz
lib/fileutils: add xreaddir()
Remove duplicate code and keep only one implementation in include/fileutils.h. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib/path.c')
-rw-r--r--lib/path.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/path.c b/lib/path.c
index a9c47f2a18..00152f54c0 100644
--- a/lib/path.c
+++ b/lib/path.c
@@ -910,21 +910,6 @@ int ul_path_writef_u64(struct path_cxt *pc, uint64_t num, const char *path, ...)
}
-static struct dirent *xreaddir(DIR *dp)
-{
- struct dirent *d;
-
- while ((d = readdir(dp))) {
- if (!strcmp(d->d_name, ".") ||
- !strcmp(d->d_name, ".."))
- continue;
-
- /* blacklist here? */
- break;
- }
- return d;
-}
-
int ul_path_count_dirents(struct path_cxt *pc, const char *path)
{
DIR *dir;