From: Chen Hanxiao Date: Mon, 30 Jun 2014 03:42:43 +0000 (+0800) Subject: LXC: throw an error if we failed to get Idmap elements X-Git-Tag: v1.2.6~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fc1d4ec7eef784af4446000bdd9fd11c95a9c29;p=thirdparty%2Flibvirt.git LXC: throw an error if we failed to get Idmap elements Throwing an error is much friendly than just "error: An error occurred, but the cause is unknown" Signed-off-by: Chen Hanxiao --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b7aa4f5171..fa64dc1707 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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; }