mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00:00
conf: node_device: Convert rest of virXPathUInt XPath expressions to number
Convert the rest of the XPath expressions used with virXPathUInt directly to convert via string(). This will become mandatory in upcoming patches. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
090d18f7f7
commit
57b016bdd3
@ -942,7 +942,7 @@ virNodeDevCapMdevTypesParseXML(xmlXPathContextPtr ctxt,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virXPathUInt("number(./availableInstances)", ctxt,
|
||||
if (virXPathUInt("string(./availableInstances)", ctxt,
|
||||
&type->available_instances) < 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR,
|
||||
_("missing number of available instances for "
|
||||
@ -2257,7 +2257,7 @@ virNodeDevCapMdevParseXML(xmlXPathContextPtr ctxt,
|
||||
|
||||
/* 'iommuGroup' is optional, only report an error if the supplied value is
|
||||
* invalid (-2), not if it's missing (-1) */
|
||||
if (virXPathUInt("number(./iommuGroup[1]/@number)",
|
||||
if (virXPathUInt("string(./iommuGroup[1]/@number)",
|
||||
ctxt, &mdev->iommuGroupNumber) < -1) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("invalid iommuGroup number attribute for '%s'"),
|
||||
|
Loading…
Reference in New Issue
Block a user