From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNp28-0006X2-57 for qemu-devel@nongnu.org; Mon, 15 Oct 2012 14:04:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNp26-000058-MI for qemu-devel@nongnu.org; Mon, 15 Oct 2012 14:04:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNp26-000054-Da for qemu-devel@nongnu.org; Mon, 15 Oct 2012 14:04:54 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9FI4rb9001228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Oct 2012 14:04:53 -0400 Message-ID: <507C5044.5020403@redhat.com> Date: Mon, 15 Oct 2012 12:04:52 -0600 From: Eric Blake MIME-Version: 1.0 References: <1350288417-24350-1-git-send-email-kraxel@redhat.com> <1350288417-24350-10-git-send-email-kraxel@redhat.com> In-Reply-To: <1350288417-24350-10-git-send-email-kraxel@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig7B75B085FFDAD0F99614A743" Subject: Re: [Qemu-devel] [PATCH v3 9/9] chardev: add hotplug support. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7B75B085FFDAD0F99614A743 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/15/2012 02:06 AM, Gerd Hoffmann wrote: > This patch adds chardev_add and chardev_del monitor commands. >=20 > They work simliar to the netdev_{add,del} commands. The hmp version of= s/simliar/similar/ > chardev_add accepts like the -chardev command line option does. The qm= p > version expects the arguments being passed as named parameters. >=20 > chardev_del just takes an id argument and zaps the chardev specified. >=20 > Signed-off-by: Gerd Hoffmann > --- > +++ b/qapi-schema.json > @@ -2796,3 +2796,42 @@ > # Since: 0.14.0 > ## > { 'command': 'screendump', 'data': {'filename': 'str'} } > + > +## > +# @chardev_add: chardev-add > +# > +# Add a chardev > +# > +# @id: the chardev's ID, must be unique > +# @backend: the chardev backend: "file", "socket", ... Should this be an enum type, instead of an open-coded string? > +# @path: file / device / unix socket path > +# @name: spice channel name > +# @host: host name > +# @port: port number > +# @server: create socket in server mode > +# @wait: wait for connect > +# @ipv4: force ipv4-only > +# @ipv6: force ipv6-only > +# @telnet: telnet negotiation > +# > +# Returns: Nothing on success > +# > +# Since: 1.3.0 > +## > +{ 'command': 'chardev_add', 'data': {'id' : 'str', > + 'backend' : 'str', > + '*props' : '**' }, Having an open-coded list for props feels awkward; it would be nicer to have the schema completely describe everything, even though that may be more documentation work. > + 'gen': 'no' } > + > +## > +# @chardev_del: chardev-del > +Arguments: > + > +- "id": the chardev's ID, must be unique (json-string) > +- "backend": the chardev backend: "file", "socket", ... (json-string) > +- "path": file / device / unix socket path (json-string, optional) > +- "name": spice channel name (json-string, optional) > +- "host": host name (json-string, optional) > +- "port": port number (json-string, optional) > +- "server": create socket in server mode (json-bool, optional) Given this line... > +- "wait": wait for connect (json-bool, optional) > +- "ipv4": force ipv4-only (json-bool, optional) > +- "ipv6": force ipv6-only (json-bool, optional) > +- "telnet": telnet negotiation (json-bool, optional) > + > +Example: > + > +-> { "execute": "chardev_add", "arguments": { "id" : "foo", > + "backend" : "socket", > + "path" : "/tmp/foo", > + "server" : "on", =2E..this line is wrong, since "on" is not a json-bool. It would have to= be "server":true > + "wait" : "off" } } Similar for "wait":false --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig7B75B085FFDAD0F99614A743 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBCAAGBQJQfFBEAAoJEKeha0olJ0NqfZQH/iDEXxiGrjxewG7dcVvj71v/ wGY1bCLlOeL1JGPdVkPkZQgUz4XHD/AHVNGoP4yaySOt2cmYRqlAI0V+16HVBLfl BjK/qXXemjaObmDouYYAcoI/1uDqUQURJAXY4fk5hqyKKLr/mARjNmfKmB+QE0nR CBX6y7jEPfwo6hj8729kFyFBJzUMdVANctgp5sYrU2tVPIJqyxN2aPY5yFUK94t+ CqFjTFN7SUkAgcNY2cb3Rinyk0Lapx7pFdjKZ+YuruCxpztzwOUAKnkncSTAH71/ FBRHclfxGOsZbEZY/uFuHx6VdA0R07/gZMsr8NdgFYofvnZqTuGofiTctmXg3Ek= =9gI8 -----END PGP SIGNATURE----- --------------enig7B75B085FFDAD0F99614A743--