提交 4d21d4ac 编写于 作者: J Jiri Denemark

cpu_conf: Fix XPath for parsing TSC frequency

Due to this bug the following command would fail on any host where TSC
frequency can be probed:

    $ virsh capabilities | virsh cpu-baseline /dev/stdin
    error: unsupported configuration: Invalid TSC frequency

https://bugzilla.redhat.com/show_bug.cgi?id=1641702Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 a95b67be
...@@ -417,8 +417,8 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, ...@@ -417,8 +417,8 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt,
if (VIR_ALLOC(tsc) < 0) if (VIR_ALLOC(tsc) < 0)
goto cleanup; goto cleanup;
if (virXPathULongLong("./counter[@name='tsc']/@frequency", ctxt, if (virXPathULongLong("string(./counter[@name='tsc']/@frequency)",
&tsc->frequency) < 0) { ctxt, &tsc->frequency) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Invalid TSC frequency")); _("Invalid TSC frequency"));
goto cleanup; goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册