mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
Move models/nmodels mismatch checking one level up
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
0ea0128904
commit
1e44c678fa
@ -128,6 +128,12 @@ cpuDecode(virConnectPtr conn,
|
||||
{
|
||||
struct cpuArchDriver *driver;
|
||||
|
||||
if (models == NULL && nmodels != 0) {
|
||||
virCPUReportError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("nonzero nmodels doesn't match with NULL models"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (cpu == NULL) {
|
||||
virCPUReportError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("invalid CPU definition"));
|
||||
|
@ -954,9 +954,6 @@ x86Decode(virCPUDefPtr cpu,
|
||||
if (data == NULL || (map = x86LoadMap()) == NULL)
|
||||
return -1;
|
||||
|
||||
if (models == NULL && nmodels != 0)
|
||||
return -1;
|
||||
|
||||
candidate = map->models;
|
||||
while (candidate != NULL) {
|
||||
bool allowed = (models == NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user