mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
conf: numa: Improve error message in case a numa node doesn't have cpus
Currently the code would exit without reporting an error as virBitmapParse reports one only if it fails to parse the bitmap, whereas the code was jumping to the error label even in case 0 cpus were correctly parsed in the map.
This commit is contained in:
parent
6b6166329f
commit
60a2ce4962
@ -749,9 +749,14 @@ virDomainNumaDefCPUParseXML(virCPUDefPtr def,
|
||||
}
|
||||
|
||||
if (virBitmapParse(tmp, 0, &def->cells[cur_cell].cpumask,
|
||||
VIR_DOMAIN_CPUMASK_LEN) <= 0)
|
||||
VIR_DOMAIN_CPUMASK_LEN) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virBitmapIsAllClear(def->cells[cur_cell].cpumask)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("NUMA cell %d has no vCPUs assigned"), cur_cell);
|
||||
goto cleanup;
|
||||
}
|
||||
VIR_FREE(tmp);
|
||||
|
||||
ctxt->node = nodes[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user