提交 7388d055 编写于 作者: N Nitesh Konkar 提交者: Jiri Denemark

cpu_ppc64: Error out when model tag missing in virsh cpu-compare xml

libvirtd throws unhandled signal 11 on ppc while running
virsh cpu-compare with missing model tag in the xml. This
patch errors out in such situation.
Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 0248098d
......@@ -247,6 +247,12 @@ ppc64ModelFromCPU(const virCPUDef *cpu,
{
struct ppc64_model *model;
if (!cpu->model) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
_("no CPU model specified"));
return NULL;
}
if (!(model = ppc64ModelFind(map, cpu->model))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unknown CPU model %s"), cpu->model);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册