<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 25, 2017 at 2:14 PM, Ján Tomko <span dir="ltr"><<a href="mailto:jtomko@redhat.com" target="_blank">jtomko@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Thu, May 25, 2017 at 02:04:16PM +0530, Nitesh Konkar wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On executing the virsh nodecpumap command, the number<br>
of CPUs present was shown as (last cpu online id + 1). This<br>
patch fixes the issue by reporting the current number of<br>
CPUs present.<br>
<br>
Signed-off-by: Nitesh Konkar <<a href="mailto:nitkon12@linux.vnet.ibm.com" target="_blank">nitkon12@linux.vnet.ibm.com</a>><br>
---<br>
src/util/virhostcpu.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c<br>
index aa9cfeac2..6d7e8b4f4 100644<br>
--- a/src/util/virhostcpu.c<br>
+++ b/src/util/virhostcpu.c<br>
@@ -1093,7 +1093,7 @@ virHostCPUGetMap(unsigned char **cpumap,<br>
    if (online)<br>
        *online = virBitmapCountBits(cpus);<br>
<br>
-    ret = virBitmapSize(cpus);<br>
+    ret = virHostCPUParseCountLinux();<br>
</blockquote>
<br></span>
This should be virHostCPUGetCount, just like we have a few lines above.<br>
That way the function has a chance of working on FreeBSD too.<br></blockquote><div>Yea agree. I missed out on checking for FreeBSD. <br></div><div>Nitesh. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Jan<br>
</blockquote></div><br></div></div>