]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Fix vcpupin command output wrong vcpu pinning info
authorLuyao Huang <lhuang@redhat.com>
Wed, 19 Dec 2018 03:17:01 +0000 (11:17 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 19 Dec 2018 09:20:57 +0000 (10:20 +0100)
Commit 3072ded3 changed the waya to format the vcpu pinning info
and forget to get cpumap for each vcpu during the loop, that cause
vcpupin command will display vcpu 0 info for other vcpus.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
tools/virsh-domain.c

index 4d9f06586a20689794e3b86cf7953e9b21b6c3a0..24f78520dee1cee8c79e8a80e1c1e5173346977c 100644 (file)
@@ -6954,7 +6954,8 @@ virshVcpuPinQuery(vshControl *ctl,
             if (got_vcpu && i != vcpu)
                 continue;
 
-            if (!(pinInfo = virBitmapDataFormat(cpumap, cpumaplen)))
+            if (!(pinInfo = virBitmapDataFormat(VIR_GET_CPUMAP(cpumap, cpumaplen, i),
+                                                cpumaplen)))
                 goto cleanup;
 
             if (virAsprintf(&vcpuStr, "%zu", i) < 0)