提交 1f467d1a 编写于 作者: P Peter Krempa

qemu: command: Move disk serial validation to qemuCheckDiskConfig

上级 cf1fcd7b
......@@ -1429,6 +1429,10 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk,
}
}
if (disk->serial &&
qemuSafeSerialParamValue(disk->serial) < 0)
return -1;
return 0;
}
......@@ -1714,8 +1718,6 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
if (disk->serial &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_SERIAL)) {
if (qemuSafeSerialParamValue(disk->serial) < 0)
goto error;
virBufferAddLit(&opt, ",serial=");
virBufferEscape(&opt, '\\', " ", "%s", disk->serial);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册