From: Michal Privoznik Date: Tue, 3 Jan 2023 16:54:57 +0000 (+0100) Subject: virQEMUCapsLoadCache: Parse properly X-Git-Tag: v9.0.0-rc1~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78b3400e50ee0ba01575749728aae9c79d9d116b;p=thirdparty%2Flibvirt.git virQEMUCapsLoadCache: Parse properly In a recent commit, when ditching virXPathULong() the parsing of was changed. But it was changed to virXMLPropUInt() which is not correct because the value we're interested in is not in an attribute but element itself. Fixes: a3c7426839df25f4026707c5877be75f2461f5e9 Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e6024a2d75..0c16366f21 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4533,8 +4533,8 @@ virQEMUCapsLoadCache(virArch hostArch, } qemuCaps->libvirtCtime = (time_t)l; - if (virXMLPropUInt(ctxt->node, "selfvers", 10, VIR_XML_PROP_NONE, - &qemuCaps->libvirtVersion) < 0) + if (virXPathUInt("string(./selfvers)", ctxt, + &qemuCaps->libvirtVersion) < 0) return -1; if (!skipInvalidation &&