]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: report error if vcpu number exceed the guest maxvcpu number
authorLuyao Huang <lhuang@redhat.com>
Mon, 29 Jun 2015 02:10:15 +0000 (10:10 +0800)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 2 Jul 2015 10:26:37 +0000 (06:26 -0400)
commit848ab685f74afae102e265108518095942ecb293
tree8b47c0a9c83d90ea212599bd09815a2d7b499b7e
parenta188c57d5432fce72daf818ccdb970ee6b71e936
virsh: report error if vcpu number exceed the guest maxvcpu number

Commit id '81dd81e' caused a regression when attempting to print a
specific vcpuid that is out of the range of the maximum vcpus for
the guest, such as:

 $ virsh vcpupin $dom 1000
 VCPU: CPU Affinity
 ----------------------------------

 $

Rather than just recover the old message, let's adjust the message based
on what would be displayed for a similar failure in the set path, such as:

 $ virsh vcpupin $dom 1000
 error: vcpu 1000 is out of range of persistent cpu count 2

 $ virsh vcpupin $dom 1000 --live
 error: vcpu 1000 is out of range of live cpu count 2

 $

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