mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: disallow empty cpuset for emulatorpin
It's disallowed in the API.
This commit is contained in:
parent
31b782a147
commit
763941749e
@ -14275,8 +14275,18 @@ virDomainEmulatorPinDefParseXML(xmlNodePtr node)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ignore_value(virBitmapParse(tmp, 0, &def, VIR_DOMAIN_CPUMASK_LEN));
|
if (virBitmapParse(tmp, 0, &def, VIR_DOMAIN_CPUMASK_LEN) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
if (virBitmapIsAllClear(def)) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
_("Invalid value of 'cpuset': %s"), tmp);
|
||||||
|
virBitmapFree(def);
|
||||||
|
def = NULL;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup:
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user