]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
LXC: throw an error if we failed to get Idmap elements
authorChen Hanxiao <chenhanxiao@cn.fujitsu.com>
Mon, 30 Jun 2014 03:42:43 +0000 (11:42 +0800)
committerJán Tomko <jtomko@redhat.com>
Mon, 30 Jun 2014 13:38:47 +0000 (15:38 +0200)
Throwing an error is much friendly than just
"error: An error occurred, but the cause is unknown"

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
src/conf/domain_conf.c

index b7aa4f5171a190944ec6a1bef6acb477c73883bb..fa64dc1707ea6c93260d0e4c8fcbbff465f9224e 100644 (file)
@@ -10983,6 +10983,8 @@ virDomainIdmapDefParseXML(xmlXPathContextPtr ctxt,
         if (virXPathUInt("string(./@start)", ctxt, &idmap[i].start) < 0 ||
             virXPathUInt("string(./@target)", ctxt, &idmap[i].target) < 0 ||
             virXPathUInt("string(./@count)", ctxt, &idmap[i].count) < 0) {
+            virReportError(VIR_ERR_XML_ERROR, "%s",
+                           _("invalid idmap start/target/count settings"));
             VIR_FREE(idmap);
             goto cleanup;
         }