[libvirt] [PATCH] virsh: host: Use bitmap size in bytes rather than bit count

Peter Krempa pkrempa at redhat.com
Mon Apr 25 08:43:41 UTC 2016


Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1329819
---
 tools/virsh-host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-host.c b/tools/virsh-host.c
index 80ac4bd..c9b2646 100644
--- a/tools/virsh-host.c
+++ b/tools/virsh-host.c
@@ -699,7 +699,7 @@ cmdNodeCpuMap(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)

     vshPrint(ctl, "%-15s ", _("CPU map:"));
     if (pretty) {
-        char *str = virBitmapDataToString(cpumap, cpunum);
+        char *str = virBitmapDataToString(cpumap, VIR_DIV_UP(cpunum, 8));

         if (!str)
             goto cleanup;
-- 
2.8.1




More information about the libvir-list mailing list