Commit '848ab68' left a issue: when we try to get a vcpupin info with no no flags or --current flags, we still will get the wrong error. Because VIR_DOMAIN_AFFECT_CURRENT is 0, so this check flags & VIR_DOMAIN_AFFECT_CURRENT will always get false. Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx> Reported by: Peter Krempa <pkrempa@xxxxxxxxxx> --- tools/virsh-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index ac04ded..00b012b 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6499,8 +6499,8 @@ cmdVcpuPin(vshControl *ctl, const vshCmd *cmd) if (got_vcpu && vcpu >= ncpus) { if (flags & VIR_DOMAIN_AFFECT_LIVE || - (flags & VIR_DOMAIN_AFFECT_CURRENT && - virDomainIsActive(dom) == 1)) + ((flags & (VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG)) + == VIR_DOMAIN_AFFECT_CURRENT && virDomainIsActive(dom) == 1)) vshError(ctl, _("vcpu %d is out of range of live cpu count %d"), vcpu, ncpus); -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list