[PATCH 01/12] virxml: Extend virXMLPropU{Int, LongLong}() error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mprivozn@xxxxxxxxxx>
---
 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;
     }
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux