]> xenbits.xensource.com Git - libvirt.git/commitdiff
cpu_x86: Fix CPU data parser
authorJiri Denemark <jdenemar@redhat.com>
Mon, 29 Jun 2015 09:07:25 +0000 (11:07 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 9 Jun 2016 07:47:56 +0000 (09:47 +0200)
The formatter uses /cpudata/cpuid elements and the parser should really
do the same.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/cpu/cpu_x86.c

index a05cea66d5135276b834a2edde92d6d0500521bd..65b7a569b0c7bc588273936e7149cf893e1978a6 100644 (file)
@@ -1309,8 +1309,8 @@ x86CPUDataParse(const char *xmlStr)
     }
     ctxt->node = xmlDocGetRootElement(xml);
 
-    n = virXPathNodeSet("/cpudata[@arch='x86']/data", ctxt, &nodes);
-    if (n < 0) {
+    n = virXPathNodeSet("/cpudata[@arch='x86']/cpuid", ctxt, &nodes);
+    if (n <= 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                        _("no x86 CPU data found"));
         goto cleanup;