]> xenbits.xensource.com Git - libvirt.git/commit
util: hostcpu: Correctly report total number of vcpus in virHostCPUGetMap
authorNitesh Konkar <niteshkonkar.libvirt@gmail.com>
Thu, 25 May 2017 10:17:43 +0000 (15:47 +0530)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 30 May 2017 08:42:28 +0000 (10:42 +0200)
commit4ae0f65669a6672a408e08698678ed2958a77fde
tree64ad1b9a84a6623f679c39ae373612de25461fdd
parentd1eea6c12aad5cb503562a52915138bf0d0a70a2
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 c67e04e25fa58104e0fae41
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: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
src/util/virhostcpu.c