From ce380b8e6fc49692bd4ad124e4d11b6d0500ef44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Mon, 19 Apr 2010 18:08:19 +0200 Subject: [PATCH] Ignore empty type attribute in driver element of virtual disks Fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578347 --- src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 0cbedf257d..355fdb9a1e 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -2479,7 +2479,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk, if (disk->readonly && qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) virBufferAddLit(&opt, ",readonly=on"); - if (disk->driverType && + if (disk->driverType && *disk->driverType != '\0' && disk->type != VIR_DOMAIN_DISK_TYPE_DIR && qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE_FORMAT) virBufferVSprintf(&opt, ",format=%s", disk->driverType); -- GitLab