From: Michal Privoznik Date: Thu, 20 Jan 2022 15:06:26 +0000 (+0100) Subject: virxml: Extend virXMLPropU{Int,LongLong}() error message X-Git-Tag: v8.1.0-rc1~337 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b64a83ae2ec4347a76acf6af9ef1518d856da43;p=thirdparty%2Flibvirt.git virxml: Extend virXMLPropU{Int,LongLong}() error message In case virXMLPropUInt() or virXMLPropULongLong() meets an attribute with a negative integer the following error message is printed: Invalid value ...: Expected integer value This message is not as good as it could be. Let users know it's a non-negative integer we are expecting. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/src/util/virxml.c b/src/util/virxml.c index 4b09374107..bb1ae3e305 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -679,7 +679,7 @@ virXMLPropUInt(xmlNodePtr node, if (ret < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s': '%s'. Expected integer value"), + _("Invalid value for attribute '%s' in element '%s': '%s'. Expected non-negative integer value"), name, node->name, tmp); return -1; } @@ -738,7 +738,7 @@ virXMLPropULongLong(xmlNodePtr node, if (ret < 0) { virReportError(VIR_ERR_XML_ERROR, - _("Invalid value for attribute '%s' in element '%s': '%s'. Expected integer value"), + _("Invalid value for attribute '%s' in element '%s': '%s'. Expected non-negative integer value"), name, node->name, tmp); return -1; }