From: Jiri Denemark Date: Wed, 22 Feb 2017 14:46:47 +0000 (+0100) Subject: qemu: Prepare for more types in qemuMonitorCPUModelInfo X-Git-Tag: v3.2.0-rc1~390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03a34f6b84da009291e8651aba71df8a6761d081;p=thirdparty%2Flibvirt.git qemu: Prepare for more types in qemuMonitorCPUModelInfo Signed-off-by: Jiri Denemark --- diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 6da86a901c..0e9c81b6b0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3203,19 +3203,19 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCaps, goto cleanup; } - if (!(str = virXMLPropString(nodes[i], "supported"))) { + if (!(str = virXMLPropString(nodes[i], "value"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("missing 'supported' attribute for a host CPU" + _("missing 'value' attribute for a host CPU" " model property in QEMU capabilities cache")); goto cleanup; } - if (STREQ(str, "yes")) { + if (STREQ(str, "true")) { hostCPU->props[i].supported = true; - } else if (STREQ(str, "no")) { + } else if (STREQ(str, "false")) { hostCPU->props[i].supported = false; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid supported value: '%s'"), str); + _("invalid boolean value: '%s'"), str); goto cleanup; } VIR_FREE(str); @@ -3560,9 +3560,9 @@ virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsPtr qemuCaps, virBufferAdjustIndent(buf, 2); for (i = 0; i < model->nprops; i++) { - virBufferAsprintf(buf, "\n", + virBufferAsprintf(buf, "\n", model->props[i].name, - model->props[i].supported ? "yes" : "no"); + model->props[i].supported ? "true" : "false"); } virBufferAdjustIndent(buf, -2); diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml index 02e89c8413..84c570020e 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -134,21 +134,21 @@ s390x - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml index 82acdb5918..64da511c78 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -207,167 +207,167 @@ (v2.8.0-1961-g5b10b94bd5) x86_64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +