Re: [PATCH] qemuProcessStop: Don't overwrite any errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/07/2014 06:41 AM, Michal Privoznik wrote:
> 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@xxxxxxxxxx>
> Reported-by: Zhou Yimin <zhouyimin@xxxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

ACK.

[It may _still_ be worth a patch that pre-creates the containing
directory at the right point in time, but this patch should go in first]

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]