From: Luyao Huang Date: Wed, 19 Dec 2018 03:17:01 +0000 (+0800) Subject: virsh: Fix vcpupin command output wrong vcpu pinning info X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ae8484586c5ad79c57515ee004ec251765cc612e;p=libvirt.git 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 --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 4d9f06586a..24f78520de 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -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)