[libvirt] [PATCH 02/41] cpu_x86: Fix CPU data parser

Jiri Denemark jdenemar at redhat.com
Wed Jun 8 08:22:16 UTC 2016


The formatter uses /cpudata/cpuid elements and the parser should really
do the same.

Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
---
 src/cpu/cpu_x86.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index a05cea6..65b7a56 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -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;
-- 
2.8.3




More information about the libvir-list mailing list