From: Guido Günther Date: Mon, 19 Apr 2010 16:08:19 +0000 (+0200) Subject: Ignore empty type attribute in driver element of virtual disks X-Git-Tag: v0.8.1~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce380b8e6fc49692bd4ad124e4d11b6d0500ef44;p=thirdparty%2Flibvirt.git Ignore empty type attribute in driver element of virtual disks Fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578347 --- 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);