mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-01 20:05:19 +00: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;
|
||||
}
|
||||
|
||||
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);
|
||||
return def;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user