From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9E7r-00047V-69 for qemu-devel@nongnu.org; Fri, 31 Jan 2014 08:27:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9E7m-0006qF-AD for qemu-devel@nongnu.org; Fri, 31 Jan 2014 08:27:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9E7m-0006qB-20 for qemu-devel@nongnu.org; Fri, 31 Jan 2014 08:27:14 -0500 Message-ID: <52EBA4AE.2060207@redhat.com> Date: Fri, 31 Jan 2014 06:27:10 -0700 From: Eric Blake MIME-Version: 1.0 References: <67b869e0b5b500dc4fb8678341ce355a24cc74e7.1391164459.git.mkletzan@redhat.com> In-Reply-To: <67b869e0b5b500dc4fb8678341ce355a24cc74e7.1391164459.git.mkletzan@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Gfgr80iF5qq2kWaxSQneKkALfJG6hwIij" Subject: Re: [Qemu-devel] [PATCH] qmp: expose list of supported character device backends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Martin Kletzander , qemu-devel@nongnu.org Cc: Markus Armbruster , Anthony Liguori , Luiz Capitulino This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Gfgr80iF5qq2kWaxSQneKkALfJG6hwIij Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01/31/2014 03:35 AM, Martin Kletzander wrote: > Introduce 'query-chardev-backends' QMP command which lists all > supported character device backends. >=20 > Signed-off-by: Martin Kletzander > --- > qapi-schema.json | 22 ++++++++++++++++++++++ > qemu-char.c | 19 +++++++++++++++++++ > qmp-commands.hx | 41 +++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 82 insertions(+) >=20 > diff --git a/qapi-schema.json b/qapi-schema.json > index 05ced9d..ac1061f 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -437,6 +437,28 @@ > { 'command': 'query-chardev', 'returns': ['ChardevInfo'] } >=20 > ## > +# @ChardevBackendInfo: > +# > +# Information about a character device backend > +# > +# @name: The backend name > +# > +# Since: 1.8.0 2.0 will be the next release. > +## > +{ 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} } > + > +## > +# @query-chardev-backends: > +# > +# Returns information about character device backends. > +# > +# Returns: a list of @ChardevBackendInfo > +# > +# Since: 1.8.0 Again, 2.0. > + > +-> { "execute": "query-chardev-backends" } > +<- { > + "return":[ > + { > + "name":"udp", > + }, This is somewhat complex, but allows us the option of future addition of other items to return in addition to the name, if it proves useful (returning a straight array of strings instead of an array of structs prevents such future expansion). So I think you made the right choice. With the fixes to the version number: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Gfgr80iF5qq2kWaxSQneKkALfJG6hwIij 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 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJS66SuAAoJEKeha0olJ0NqztMH/2SLdg/1Y3UVj33a4DoszwpQ F6WxDv8BpEXQi6cOwtcnMpCvCyHZc2f1/rKWV87dHgVPouTdsnjT/9/dBZZ37OfZ LViRXKR04NbaO9xhSJInBUXaCvWXgUoHwJR3Jk+6eJ8++zQiE/46sMgnW4rqM2gr yveVec09Q2ZcAi5pWxXry+X24NsfzbaM0j0of/2wMpEbThuCKMHDP1UMtAqqSAXs cJnDCuiYOL76TfKgnBzmObQHtn2EbAB+AvlTSGpdru8hVSpzlAvWhGQ2viHKjp4u mfGrq7N3GyPfu1u0sOX6rxECII5Wx+F33CIDBX+rnTIfks9b3b6XsJHfoD8d+XU= =Tdw4 -----END PGP SIGNATURE----- --Gfgr80iF5qq2kWaxSQneKkALfJG6hwIij--