]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuProcessStop: Don't overwrite any errors
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 7 Jan 2014 13:31:13 +0000 (14:31 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 7 Jan 2014 13:50:40 +0000 (14:50 +0100)
commit088ff08ce9f0338949316d853548902fabbdc9af
treee427133da25cb1dc25d43da58e9c9930bd187a73
parent599ef94d852a09a4a519939b65f8f009133f9a8d
qemuProcessStop: Don't overwrite any errors

Currently, the qemuProcessStop tries to open the domain log file
and saves the original error afterwards. Then all the cleanup is
done after which the error is restored back. This has however one
flaw: if opening of the log file fails an error is reported,
which results in previous error being overwritten (the useful
one, e.g. "PCI device XXXX:XXXX could not be found"). Hence, user
sees something like:

  error: failed to create logfile /var/log/libvirt/qemu/ovirt_usb.log: No such file or directory

instead of:

  error: internal error: Did not find USB device 8644:8003

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reported-by: Zhou Yimin <zhouyimin@huawei.com>
src/qemu/qemu_process.c