We can't rely on d_type == DT_DIR because on some filesystems d_type is not supported. A check for domain-ID-NAME/org.github.vhostmd.1 should be sufficient. --- vhostmd/virtio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vhostmd/virtio.c b/vhostmd/virtio.c index 3cc0f6e..f227b45 100644 --- a/vhostmd/virtio.c +++ b/vhostmd/virtio.c @@ -278,8 +278,7 @@ static int vio_readdir(const char * path) while ((ent = readdir(dir)) != NULL) { int rc, id; - if (ent->d_type == DT_DIR && - sscanf(ent->d_name, "domain-%d-", &id) == 1) { + if (sscanf(ent->d_name, "domain-%d-", &id) == 1) { char tmp[SUN_PATH_LEN + 8]; struct stat st; -- _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list