On 11/27/2015 08:01 PM, Chen Hanxiao wrote:
> From: Chen Hanxiao <[email protected]>
> 
> This patch add support for system_suspend hmp command.
> 
> Signed-off-by: Chen Hanxiao <[email protected]>
> ---
>  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