提交 ce380b8e 编写于 作者: G Guido Günther

Ignore empty type attribute in driver element of virtual disks

Fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578347
上级 84bc7ac0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册