提交 92cbe7ae 编写于 作者: D Daniel P. Berrange

Improve error message diagnosing incorrect XML CPU mode

Tell the user what CPU mode value is wrong
上级 e0f0131d
...@@ -234,13 +234,15 @@ virCPUDefParseXML(const xmlNodePtr node, ...@@ -234,13 +234,15 @@ virCPUDefParseXML(const xmlNodePtr node,
goto error; goto error;
} else { } else {
def->mode = virCPUModeTypeFromString(cpuMode); def->mode = virCPUModeTypeFromString(cpuMode);
VIR_FREE(cpuMode);
if (def->mode < 0) { if (def->mode < 0) {
virCPUReportError(VIR_ERR_INTERNAL_ERROR, "%s", virCPUReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid mode attribute")); _("Invalid mode attribute '%s'"),
cpuMode);
VIR_FREE(cpuMode);
goto error; goto error;
} }
VIR_FREE(cpuMode);
} }
} else { } else {
if (def->type == VIR_CPU_TYPE_HOST) if (def->type == VIR_CPU_TYPE_HOST)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册