提交 52c4d49c 编写于 作者: D Daniel P. Berrange 提交者: Cole Robinson

Improve error message diagnosing incorrect XML CPU mode

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