Re: [PATCH] qemu: time: Report errors if agent command fails

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

 



On 09/16/2014 07:42 AM, Peter Krempa wrote:
> Commit b606bbb4 broke reporting of errors when setting of guest time
> fails via the guest agent as the return value is not checked and later
> overwritten by the return value qemuMonitorRTCResetReinjection();
> 
> Fix this by checking the return value before resetting the RTC
> reinjection.
> ---
>  src/qemu/qemu_driver.c | 3 +++
>  1 file changed, 3 insertions(+)

ACK

> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 6008aeb..15ad64d 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -17134,6 +17134,9 @@ qemuDomainSetTime(virDomainPtr dom,
>      rv = qemuAgentSetTime(priv->agent, seconds, nseconds, rtcSync);
>      qemuDomainObjExitAgent(vm);
> 
> +    if (rv < 0)
> +        goto endjob;
> +
>      if (!virDomainObjIsActive(vm)) {
>          virReportError(VIR_ERR_OPERATION_INVALID,
>                         "%s", _("domain is not running"));
> 

-- 
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]