qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/2] hmp: add support for system_suspend


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 2/2] hmp: add support for system_suspend
Date: Mon, 30 Nov 2015 11:12:27 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/27/2015 08:01 PM, Chen Hanxiao wrote:
> From: Chen Hanxiao <address@hidden>
> 
> This patch add support for system_suspend hmp command.
> 
> Signed-off-by: Chen Hanxiao <address@hidden>
> ---
>  hmp-commands.hx | 14 ++++++++++++++
>  hmp.c           |  5 +++++
>  hmp.h           |  1 +
>  3 files changed, 20 insertions(+)
> 

> +++ b/hmp.c
> @@ -885,6 +885,11 @@ void hmp_system_powerdown(Monitor *mon, const QDict 
> *qdict)
>      qmp_system_powerdown(NULL);
>  }
>  
> +void hmp_system_suspend(Monitor *mon, const QDict *qdict)
> +{
> +    qmp_system_suspend(NULL);

Why are you ignoring any potential errors?  Wouldn't it be better to
report an error, if one occurs?  Or at least pass &error_abort to assert
that no error can occur (matching the current implementation in patch
1/2 that never fails).

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]