1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-21 10:50:24 +03:00

virQEMUCapsLoadCache: Parse <selfvers/> properly

In a recent commit, when ditching virXPathULong() the parsing of
<selfvers/> 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 <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Michal Privoznik 2023-01-03 17:54:57 +01:00
parent ee394550df
commit 78b3400e50

View File

@ -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 &&