提交 4ae0f656 编写于 作者: N Nitesh Konkar 提交者: Peter Krempa

util: hostcpu: Correctly report total number of vcpus in virHostCPUGetMap

Callers expect the return value to be the total number of vcpus in the
host (including offline vcpus). The refactor in c67e04e2
broke this assumption by using virHostCPUGetOnlineBitmap which only
creates a bitmap long enough to hold the last online vcpu.

Report the full number of host vcpus by returning value from
virHostCPUGetCount().
Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
上级 d1eea6c1
......@@ -1093,7 +1093,7 @@ virHostCPUGetMap(unsigned char **cpumap,
if (online)
*online = virBitmapCountBits(cpus);
ret = virBitmapSize(cpus);
ret = virHostCPUGetCount();
cleanup:
if (ret < 0 && cpumap)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册