From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTC8c-0003DG-Rt for qemu-devel@nongnu.org; Tue, 09 Feb 2016 12:31:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTC8X-0005OC-TE for qemu-devel@nongnu.org; Tue, 09 Feb 2016 12:31:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTC8X-0005NF-Ns for qemu-devel@nongnu.org; Tue, 09 Feb 2016 12:31:37 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 3AC723CBA41 for ; Tue, 9 Feb 2016 17:31:37 +0000 (UTC) References: <1453978470-222624-1-git-send-email-imammedo@redhat.com> <1453978470-222624-6-git-send-email-imammedo@redhat.com> From: Eric Blake Message-ID: <56BA2278.9090801@redhat.com> Date: Tue, 9 Feb 2016 10:31:36 -0700 MIME-Version: 1.0 In-Reply-To: <1453978470-222624-6-git-send-email-imammedo@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1LsmXpcnuMobgKtNTSnM273tM3X704e51" Subject: Re: [Qemu-devel] [PATCH v19 5/9] qmp/hmp: add query-vm-generation-id and 'info vm-generation-id' commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , qemu-devel@nongnu.org Cc: ghammer@redhat.com, lcapitulino@redhat.com, lersek@redhat.com, ehabkost@redhat.com, mst@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1LsmXpcnuMobgKtNTSnM273tM3X704e51 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/28/2016 03:54 AM, Igor Mammedov wrote: > Add commands to query Virtual Machine Generation ID counter. >=20 > QMP command example: > { "execute": "query-vm-generation-id" } >=20 > HMP command example: > info vm-generation-id >=20 > Signed-off-by: Igor Mammedov > --- > v18: > - add a new QMP type GuidInfo instead of reusing UuidInfo > Eric Blake > --- > +++ b/hmp.c > @@ -2375,3 +2375,12 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, cons= t QDict *qdict) > =20 > qapi_free_RockerOfDpaGroupList(list); > } > + > +void hmp_info_vm_generation_id(Monitor *mon, const QDict *qdict) > +{ > + GuidInfo *info =3D qmp_query_vm_generation_id(NULL); Should we report rather than ignore errors in the HMP interface? > + if (info) { > + monitor_printf(mon, "%s\n", info->guid); > + } > +++ b/qapi-schema.json > @@ -4083,3 +4083,23 @@ > ## > { 'enum': 'ReplayMode', > 'data': [ 'none', 'record', 'play' ] } > + > +## > +# @GuidInfo: > +# > +# GUID information. > +# > +# @guid: the globally unique identifier Maybe add "in usual ASCII format" to make it obvious it is the 36-byte string, not the 16-byte binary value. But neither comment is a strong objection, so: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --1LsmXpcnuMobgKtNTSnM273tM3X704e51 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/ iQEcBAEBCAAGBQJWuiJ4AAoJEKeha0olJ0NqXaoH/0YiQnNZK26CszYXfRkEVdFh gC7WeEXQdODMGRtdPeU9r6SbsfmcmeTB2jlA6xxpBoRV5sIQ6inHFaYZx8j/MI8n ipa85BN9Ntld/zQYdgmmJJa/W3W53ufMTcNdGGCT2/VNvUGBM1z+sbModW5J7eZ4 RaFoz7tuAgvoYw5ZUdezl0/ynCRYPkGsOZmFgZsiLEEY9J3HmoBV2SZnWpLDHgfl wpbPpljZZxBc80NrvqA952uvDxqL1IFGuIoIoloJFBLNPgOdL6yYXkYF7/IBvkPK f2+3azGrHZwNvn3lz9btzoraOgi7s/qjtRII3L/QTXIsmd3/MLYURwPTZ6dXB5o= =7zk0 -----END PGP SIGNATURE----- --1LsmXpcnuMobgKtNTSnM273tM3X704e51--