[libvirt] [PATCH v2] Regression: Report correct CPUs present on executing virsh nodecpumap
Ján Tomko
jtomko at redhat.com
Thu May 25 08:44:48 UTC 2017
On Thu, May 25, 2017 at 02:04:16PM +0530, Nitesh Konkar wrote:
>On executing the virsh nodecpumap command, the number
>of CPUs present was shown as (last cpu online id + 1). This
>patch fixes the issue by reporting the current number of
>CPUs present.
>
>Signed-off-by: Nitesh Konkar <nitkon12 at linux.vnet.ibm.com>
>---
> src/util/virhostcpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
>index aa9cfeac2..6d7e8b4f4 100644
>--- a/src/util/virhostcpu.c
>+++ b/src/util/virhostcpu.c
>@@ -1093,7 +1093,7 @@ virHostCPUGetMap(unsigned char **cpumap,
> if (online)
> *online = virBitmapCountBits(cpus);
>
>- ret = virBitmapSize(cpus);
>+ ret = virHostCPUParseCountLinux();
This should be virHostCPUGetCount, just like we have a few lines above.
That way the function has a chance of working on FreeBSD too.
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170525/83278cc9/attachment-0001.sig>
More information about the libvir-list
mailing list