提交 cdf0ba1c 编写于 作者: P Peter Krempa

conf: Improve core dump config error message

The message didn't seem to be much helpful
上级 d3d59201
...@@ -9265,16 +9265,13 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps, ...@@ -9265,16 +9265,13 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
goto error; goto error;
/* and info about it */ /* and info about it */
tmp = virXPathString("string(./memory[1]/@dumpCore)", ctxt); if ((tmp = virXPathString("string(./memory[1]/@dumpCore)", ctxt)) &&
if (tmp) { (def->mem.dump_core = virDomainMemDumpTypeFromString(tmp)) <= 0) {
def->mem.dump_core = virDomainMemDumpTypeFromString(tmp); virReportError(VIR_ERR_XML_ERROR,
_("Invalid memory core dump attribute value '%s'"), tmp);
if (def->mem.dump_core <= 0) { goto error;
virReportError(VIR_ERR_XML_ERROR, _("Bad value '%s'"), tmp);
goto error;
}
VIR_FREE(tmp);
} }
VIR_FREE(tmp);
if (def->mem.cur_balloon > def->mem.max_balloon) { if (def->mem.cur_balloon > def->mem.max_balloon) {
/* Older libvirt could get into this situation due to /* Older libvirt could get into this situation due to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册