From 57b016bdd33397856f7069777bfad28d96e7eb73 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 5 Oct 2022 10:40:04 +0200 Subject: [PATCH] conf: node_device: Convert rest of virXPathUInt XPath expressions to number MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko --- src/conf/node_device_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index e775f32c5d..1c4f5b7814 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -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'"), -- 2.47.2