1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

conf: Improve core dump config error message

The message didn't seem to be much helpful
This commit is contained in:
Peter Krempa 2013-02-20 16:31:14 +01:00
parent d3d5920181
commit cdf0ba1c3a

View File

@ -9265,16 +9265,13 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
goto error;
/* and info about it */
tmp = virXPathString("string(./memory[1]/@dumpCore)", ctxt);
if (tmp) {
def->mem.dump_core = virDomainMemDumpTypeFromString(tmp);
if (def->mem.dump_core <= 0) {
virReportError(VIR_ERR_XML_ERROR, _("Bad value '%s'"), tmp);
goto error;
}
VIR_FREE(tmp);
if ((tmp = virXPathString("string(./memory[1]/@dumpCore)", ctxt)) &&
(def->mem.dump_core = virDomainMemDumpTypeFromString(tmp)) <= 0) {
virReportError(VIR_ERR_XML_ERROR,
_("Invalid memory core dump attribute value '%s'"), tmp);
goto error;
}
VIR_FREE(tmp);
if (def->mem.cur_balloon > def->mem.max_balloon) {
/* Older libvirt could get into this situation due to