virsh: Fix vcpupin command output wrong vcpu pinning info

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>
This commit is contained in:
Luyao Huang 2018-12-19 11:17:01 +08:00 committed by Michal Privoznik
parent 4d95d35637
commit ae8484586c

View 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)