From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3SwF-0000JN-QD for qemu-devel@nongnu.org; Mon, 30 Nov 2015 13:12:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3SwB-0003HU-PK for qemu-devel@nongnu.org; Mon, 30 Nov 2015 13:12:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3SwB-0003HF-Js for qemu-devel@nongnu.org; Mon, 30 Nov 2015 13:12:31 -0500 References: <1448679706-23771-1-git-send-email-chen_han_xiao@126.com> <1448679706-23771-3-git-send-email-chen_han_xiao@126.com> From: Eric Blake Message-ID: <565C918B.4040504@redhat.com> Date: Mon, 30 Nov 2015 11:12:27 -0700 MIME-Version: 1.0 In-Reply-To: <1448679706-23771-3-git-send-email-chen_han_xiao@126.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="skderw7pufr9L9cW86fPOWjKov7csMwtt" Subject: Re: [Qemu-devel] [PATCH v2 2/2] hmp: add support for system_suspend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chen Hanxiao , Luiz Capitulino , Markus Armbruster Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --skderw7pufr9L9cW86fPOWjKov7csMwtt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/27/2015 08:01 PM, Chen Hanxiao wrote: > From: Chen Hanxiao >=20 > This patch add support for system_suspend hmp command. >=20 > Signed-off-by: Chen Hanxiao > --- > hmp-commands.hx | 14 ++++++++++++++ > hmp.c | 5 +++++ > hmp.h | 1 + > 3 files changed, 20 insertions(+) >=20 > +++ b/hmp.c > @@ -885,6 +885,11 @@ void hmp_system_powerdown(Monitor *mon, const QDic= t *qdict) > qmp_system_powerdown(NULL); > } > =20 > +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). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --skderw7pufr9L9cW86fPOWjKov7csMwtt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWXJGLAAoJEKeha0olJ0NqEB0H/2GkzDFpaQ7yswyobH/L9ACM 72CVR2xRt8dTXACfh4o8ikX8Hyr6n8RUx52+Cjz4XXdse1iWFq1C5EQi76n15GVW +GgPDIdfxXRw0jeIgvtROcEdfSMP5aXDvFr/TjlfdXDW1B2/AOP96h4u9x1fS5Eg vmCS5Vp3xniXhk2juSMav9IK+31d2cHePZfhy6cjj5A/SIGw6iBrOEoW+P9wJbfG Ndrk3BhUKYHAHhofzCh+jkKB/JjAKs+AmgA9uVqfgNBW+0biu4Bf8YI6qc+saTr2 IcqXrj325YeptTEszPSoMQXwe/PK/IZLP75iz5f3dO5nIIWatyX/rqcKztHnpyw= =ihBP -----END PGP SIGNATURE----- --skderw7pufr9L9cW86fPOWjKov7csMwtt--