提交 19e06cfa 编写于 作者: J Jiri Denemark

qemu: Ignore non-boolean CPU model properties

The query-cpu-model-expansion is currently implemented for s390(x) only
and all CPU properties it returns are booleans. However, x86
implementation will report more types of properties. Without making the
code more tolerant older libvirt would fail to probe newer QEMU
versions.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 ec237915
......@@ -4982,15 +4982,12 @@ qemuMonitorJSONParseCPUModelProperty(const char *key,
size_t n = machine_model->nprops;
bool supported;
if (virJSONValueGetBoolean(value, &supported) < 0)
return 0;
if (VIR_STRDUP(machine_model->props[n].name, key) < 0)
return -1;
if (virJSONValueGetBoolean(value, &supported) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("query-cpu-model-expansion reply data is missing a"
" feature support value"));
return -1;
}
machine_model->props[n].supported = supported;
machine_model->nprops++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册