]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Report an error when cpulist parsing fails
authorLuyao Huang <lhuang@redhat.com>
Mon, 11 May 2015 08:25:19 +0000 (16:25 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 14 May 2015 12:16:07 +0000 (14:16 +0200)
commit60107346a40d362805301113a965213eaa33aa85
tree02883e6f4eec2a83b636ad96c30f78eb12d696f0
parent2f1f28885a1104626e1fef741f8a564767541440
virsh: Report an error when cpulist parsing fails

When parsing a cpulist, the virBitmapParse is used. On an invalid
bitmap an error is reported, but the error gets cleared
immediately by subsequent public APIs call, e.g. virDomainFree().
Moreover, we don't check whether bitmap fits into maximal CPU ID
on the host. Therefore the following examples failed without any
error:

 # virsh vcpupin test3 1 aaa

 # virsh vcpupin test3 1 1000

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