提交 87c86231 编写于 作者: J Jiri Denemark

qemu: Do not fail virConnectCompareCPU if host CPU is not known

When host CPU could not be properly detected, virConnectCompareCPU will
just report that any CPU is incompatible with host CPU instead of
failing.
上级 8e6fb68f
......@@ -9423,9 +9423,12 @@ qemuCPUCompare(virConnectPtr conn,
qemuDriverLock(driver);
if (!driver->caps || !driver->caps->host.cpu) {
qemuReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("cannot get host CPU capabilities"));
if (!driver->caps) {
qemuReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("cannot get host capabilities"));
} else if (!driver->caps->host.cpu) {
VIR_WARN("cannot get host CPU capabilities");
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
} else {
ret = cpuCompareXML(driver->caps->host.cpu, xmlDesc);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册