From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQKpP-0004si-ST for qemu-devel@nongnu.org; Thu, 21 Jul 2016 16:44:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQKpL-0006uP-IH for qemu-devel@nongnu.org; Thu, 21 Jul 2016 16:44:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQKpL-0006uI-9l for qemu-devel@nongnu.org; Thu, 21 Jul 2016 16:44:15 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D19A56315E for ; Thu, 21 Jul 2016 20:44:13 +0000 (UTC) References: <20160721140030.28383-1-marcandre.lureau@redhat.com> <20160721140030.28383-3-marcandre.lureau@redhat.com> From: Eric Blake Message-ID: <5791341B.3040903@redhat.com> Date: Thu, 21 Jul 2016 14:44:11 -0600 MIME-Version: 1.0 In-Reply-To: <20160721140030.28383-3-marcandre.lureau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bXuO91BDKhQiBAQkOafDmb66wPFmJf82h" Subject: Re: [Qemu-devel] [PATCH v2 02/12] qapi-schema: add 'device_add' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bXuO91BDKhQiBAQkOafDmb66wPFmJf82h From: Eric Blake To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: armbru@redhat.com Message-ID: <5791341B.3040903@redhat.com> Subject: Re: [PATCH v2 02/12] qapi-schema: add 'device_add' References: <20160721140030.28383-1-marcandre.lureau@redhat.com> <20160721140030.28383-3-marcandre.lureau@redhat.com> In-Reply-To: <20160721140030.28383-3-marcandre.lureau@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/21/2016 08:00 AM, marcandre.lureau@redhat.com wrote: > From: Marc-Andr=C3=A9 Lureau >=20 > Even though device_add is not fully qapi'fied, we may add it to the jso= n > schema with 'gen': false, so registration and documentation can be > generated. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > qapi-schema.json | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > +++ b/qapi-schema.json > @@ -2200,6 +2200,35 @@ > ## > { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } = } > =20 > +## > +# @device_add: > +# > +# @driver: the name of the new device's driver > +# @bus: #optional the device's parent bus (device tree path) > +# @id: the device's ID, must be unique > +# @props: #optional a dictionary of properties to be passed to the bac= kend > +# > +# Add a device. > +# > +# Notes: > +# 1. For detailed information about this command, please refer to the > +# 'docs/qdev-device-use.txt' file. > +# > +# 2. It's possible to list device properties by running QEMU with the > +# "-device DEVICE,help" command-line argument, where DEVICE is the > +# device's name > +# > +# Example: > +# > +# -> { "execute": "device_add", > +# "arguments": { "driver": "e1000", "id": "net1" } } Is it worth an example that includes 'bus' and/or 'props'? > +# <- { "return": {} } > +# > +# Since: 0.13 > +## > +{ 'command': 'device_add', > + 'data': {'driver': 'str', 'id': 'str'}, 'gen': false } The documentation mentions fields not listed here, but the 'gen':false explains why. We may yet get device_add QAPIfied for 2.8, but there's nothing wrong with documenting things now. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --bXuO91BDKhQiBAQkOafDmb66wPFmJf82h 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/ iQEcBAEBCAAGBQJXkTQbAAoJEKeha0olJ0NqLgUH/Aulg2Pl2BLgFlJ2ZdSrWepT bzlSBwQwvmCxWLxxdZgRAWdONBqzs/PRp+2ItEAg9lBaMMiqZ6aL+qhDaQWR/DxR /GVIOR/KmlCUSZPYoqfkqx5GQ9Ajm2DAKBZGOFNh883cflb5Nq+SCtAm/kkm+pnk c5hZyRg0TgeSI7opH4OMi4XzYd4r5s0hfg0MB7hy6d11F/CwbHZV73DsKZMhnEDM 5HGWSC9N39YlsU2RIP5OucIm20y7cfXave+1U/hp+2SL+fub2anbOo9Wi/LwHYT2 izByW4M3JFHiS7QJBpRAaC64Zq7fjoy/1HyOREoAm0UJ2ItZDLAfuCVHrqoigRo= =BVV1 -----END PGP SIGNATURE----- --bXuO91BDKhQiBAQkOafDmb66wPFmJf82h--