]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Fix return value of qemuDomainGetBlockJobInfo
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 4 Jan 2016 14:49:56 +0000 (15:49 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 5 Jan 2016 07:59:44 +0000 (08:59 +0100)
commit783b254413fee8d33467a0abd4dff609a1daef7b
tree57d44bde9f2b2dd64005d1db8815d7b4246e9ac5
parentead30f4dd55b2e7f125b6852062f7cc9f727795e
qemu: Fix return value of qemuDomainGetBlockJobInfo

While reviewing 1b43885d1784640 I've noticed a virReportError()
followed by a goto endjob; without setting the correct return
value. Problem is, if block job is so fast that it's bandwidth
does not fit into ulong, an error is reported. However, by that
time @ret is already set to 1 which means success. Since the
scenario can be hardly considered successful, we should return a
value meaning error.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_driver.c