From a7c60528f91e62d24ea5c69042f31c5975a599c1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 4 Mar 2014 11:27:46 +0100 Subject: partx: make dirent d_type usage more robust Signed-off-by: Karel Zak --- disk-utils/partx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'disk-utils/partx.c') 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))) -- cgit v1.2.3-55-g7522