]> xenbits.xensource.com Git - 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)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 25 Apr 2016 11:27:16 +0000 (13:27 +0200)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1329819

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;