mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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: Nitesh Konkar <nitkon12@linux.vnet.ibm.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
0248098d38
commit
7388d055d4
@ -247,6 +247,12 @@ ppc64ModelFromCPU(const virCPUDef *cpu,
|
|||||||
{
|
{
|
||||||
struct ppc64_model *model;
|
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))) {
|
if (!(model = ppc64ModelFind(map, cpu->model))) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Unknown CPU model %s"), cpu->model);
|
_("Unknown CPU model %s"), cpu->model);
|
||||||
|
Loading…
Reference in New Issue
Block a user