[libvirt] [PATCH] conf: More clear error msg for incomplete coalesce xml

Han Han hhan at redhat.com
Sun Oct 14 14:26:42 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1535930

Report more clear err msg instead of unknown error when coalesce
settings is incomplete.

Signed-off-by: Han Han <hhan at redhat.com>
---
 src/conf/domain_conf.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9911d56130..e755f45d3d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7804,8 +7804,12 @@ virDomainNetDefCoalesceParseXML(xmlNodePtr node,
     ctxt->node = node;
 
     str = virXPathString("string(./rx/frames/@max)", ctxt);
-    if (!str)
+    if (!str) {
+        virReportError(VIR_ERR_XML_DETAIL,
+                       "%s",
+                       _("incomplete coalesce settings in interface xml"));
         goto cleanup;
+    }
 
     if (VIR_ALLOC(ret) < 0)
         goto cleanup;
-- 
2.19.1




More information about the libvir-list mailing list