From: Karel Zak Date: Tue, 4 Mar 2014 10:30:03 +0000 (+0100) Subject: lib/sysfs: make dirent d_type usage more robust X-Git-Tag: v2.25-rc1~563 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea7f012b7c4f74de3e352baeba4fde2b8f11d9b7;p=thirdparty%2Futil-linux.git lib/sysfs: make dirent d_type usage more robust Signed-off-by: Karel Zak --- diff --git a/lib/sysfs.c b/lib/sysfs.c index 5203e63fc1..eee0827539 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -290,7 +290,8 @@ int sysfs_is_partition_dirent(DIR *dir, struct dirent *d, const char *parent_nam #ifdef _DIRENT_HAVE_D_TYPE if (d->d_type != DT_DIR && - d->d_type != DT_LNK) + d->d_type != DT_LNK && + d->d_type != DT_UNKNOWN) return 0; #endif if (parent_name) {