diff options
| author | Karel Zak <kzak@redhat.com> | 2019-04-11 13:11:53 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2019-04-11 13:11:53 +0200 |
| commit | 7761bd3bb6c56a375ad8d027c20d020aaa33e2d8 (patch) | |
| tree | 1c5a07da00a32e8b6dbde0eef1500f48ef340af2 /lib/sysfs.c | |
| parent | 146900d41166efc375d69d7a51f9675dba684f6a (diff) | |
| download | util-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/sysfs.c')
| -rw-r--r-- | lib/sysfs.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/sysfs.c b/lib/sysfs.c index 6916c2584d..9e336adcf9 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -200,21 +200,6 @@ char *sysfs_blkdev_get_name(struct path_cxt *pc, char *buf, size_t bufsiz) return buf; } -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 sysfs_blkdev_is_partition_dirent(DIR *dir, struct dirent *d, const char *parent_name) { char path[NAME_MAX + 6 + 1]; |
