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

Eric Blake eblake at redhat.com
Tue Sep 16 13:52:20 UTC 2014


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140916/2132ad16/attachment-0001.sig>


More information about the libvir-list mailing list