]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: host: Use bitmap size in bytes rather than bit count
authorPeter Krempa <pkrempa@redhat.com>
Mon, 25 Apr 2016 08:38:01 +0000 (10:38 +0200)
committerCole Robinson <crobinso@redhat.com>
Wed, 4 May 2016 22:49:41 +0000 (18:49 -0400)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1329819
(cherry picked from commit 3a703b8120d9f996840bd315b6f74c45a7e98aad)

tools/virsh-host.c

index 80ac4bd04b6c5f71ca3ce98c500725b5e2e9ac1c..57f0c0ec077e17a1aaec66043985e232e6b87e9f 100644 (file)
@@ -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_CPU_MAPLEN(cpunum));
 
         if (!str)
             goto cleanup;