summaryrefslogtreecommitdiffstats
path: root/disk-utils/partx.c
diff options
context:
space:
mode:
authorKarel Zak2014-03-04 11:27:46 +0100
committerKarel Zak2014-03-04 11:27:46 +0100
commita7c60528f91e62d24ea5c69042f31c5975a599c1 (patch)
treebdc836b399288a5555c76ab9ca21f3b49b039c4f /disk-utils/partx.c
parentlibmount: cgroup magic already defined (diff)
downloadkernel-qcow2-util-linux-a7c60528f91e62d24ea5c69042f31c5975a599c1.tar.gz
kernel-qcow2-util-linux-a7c60528f91e62d24ea5c69042f31c5975a599c1.tar.xz
kernel-qcow2-util-linux-a7c60528f91e62d24ea5c69042f31c5975a599c1.zip
partx: make dirent d_type usage more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/partx.c')
-rw-r--r--disk-utils/partx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/partx.c b/disk-utils/partx.c
index ec48047c4..44d38fd0e 100644
--- a/disk-utils/partx.c
+++ b/disk-utils/partx.c
@@ -234,7 +234,7 @@ static int get_max_partno(const char *disk, dev_t devno)
!strcmp(d->d_name, ".."))
continue;
#ifdef _DIRENT_HAVE_D_TYPE
- if (d->d_type != DT_DIR)
+ if (d->d_type != DT_DIR && d->d_type != DT_UNKNOWN)
continue;
#endif
if (strncmp(parent, d->d_name, strlen(parent)))