mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-06 21:15:22 +00:00
Improve error message diagnosing incorrect XML CPU mode
Tell the user what CPU mode value is wrong
(cherry picked from commit 92cbe7ae39
)
This commit is contained in:
parent
e6c5ae46f7
commit
52c4d49ca3
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user