mirror of https://gitee.com/openkylin/libvirt.git
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…
Reference in New Issue