From 7b64a83ae2ec4347a76acf6af9ef1518d856da43 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 20 Jan 2022 16:06:26 +0100 Subject: [PATCH] virxml: Extend virXMLPropU{Int,LongLong}() error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/util/virxml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }