From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XteZz-0007vM-7o for qemu-devel@nongnu.org; Wed, 26 Nov 2014 10:32:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XteZu-0000O5-PK for qemu-devel@nongnu.org; Wed, 26 Nov 2014 10:32:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XteZu-0000O1-GQ for qemu-devel@nongnu.org; Wed, 26 Nov 2014 10:32:26 -0500 Message-ID: <5475F27F.1070205@redhat.com> Date: Wed, 26 Nov 2014 08:32:15 -0700 From: Eric Blake MIME-Version: 1.0 References: <20141126103841.7772.11864.stgit@PASHA-ISP> <20141126103903.7772.36900.stgit@PASHA-ISP> In-Reply-To: <20141126103903.7772.36900.stgit@PASHA-ISP> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0MDle9O3IeNXCRaXHDwT8pxcao2UUOEEI" Subject: Re: [Qemu-devel] [RFC PATCH v5 03/31] replay: global variables and function stubs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, pbonzini@redhat.com, alex.bennee@linaro.org, afaerber@suse.de, fred.konrad@greensocs.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0MDle9O3IeNXCRaXHDwT8pxcao2UUOEEI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/26/2014 03:39 AM, Pavel Dovgalyuk wrote: > This patch adds global variables, defines, functions declarations, > and function stubs for deterministic VM replay used by external modules= =2E >=20 > Signed-off-by: Pavel Dovgalyuk > --- > +# Since: 2.3 > +## > +{ 'enum': 'ReplaySubmode', > + 'data': [ 'unknown', 'normal' ] } > diff --git a/replay/Makefile.objs b/replay/Makefile.objs > +++ b/stubs/replay.c > @@ -0,0 +1,8 @@ > +#include "replay/replay.h" > + > +ReplayMode replay_mode; > + > +ReplaySubmode replay_get_play_submode(void) > +{ > + return 0; Although QMP code generation happens to assign 0 to the first listed enum (in this case, REPLAY_SUBMODE_UNKNOWN), it is safer to explicitly use an enum value rather than an open-coded '0' in this function. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --0MDle9O3IeNXCRaXHDwT8pxcao2UUOEEI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUdfJ/AAoJEKeha0olJ0Nqa7QH/iHEi88/AQ4bNbQBoObymX/9 azBQaIOy7ITxQTj2/jrLVH95QtFnmMZr6f+RLy4ywOcVL9gWrapqU3+LukXeO/ZH rrB7t+O+iR14Fl+zLAT+xQOqsoGkQaq159mSWSomVxA44YFbQTs/jkt3CxwG/wCg hZA6GOxsGf1Rr4Yll7ERzrVTfcLRwu70kruODZBjtjBDJ38TR6vhxtb9GUq7dXGS pi/zT4HNI9+Auka6YjB8avynTYN9dqld29oYyscA7bIG86gT7kRnj0gdDb1RclGp tLxpN/LiPJs8aAbhDQnW/RmZ3Z2nCQ4VrtCuhhOTx2+nEB/dCebWhNcUr3GJ3ic= =AHcs -----END PGP SIGNATURE----- --0MDle9O3IeNXCRaXHDwT8pxcao2UUOEEI--