From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNob7-0000OT-NY for qemu-devel@nongnu.org; Mon, 15 Oct 2012 13:37:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNob3-0005Ay-9C for qemu-devel@nongnu.org; Mon, 15 Oct 2012 13:37:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNob2-0005AI-Vx for qemu-devel@nongnu.org; Mon, 15 Oct 2012 13:36:57 -0400 Message-ID: <507C49AC.8060700@redhat.com> Date: Mon, 15 Oct 2012 11:36:44 -0600 From: Eric Blake MIME-Version: 1.0 References: <50780F22.7030106@redhat.com> <1350045545-13104-1-git-send-email-kraxel@redhat.com> <507BB25E.2030401@linux.vnet.ibm.com> In-Reply-To: <507BB25E.2030401@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigB1775A7B4F9E4B8915D2E658" Subject: Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lei Li Cc: Gerd Hoffmann , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB1775A7B4F9E4B8915D2E658 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 10/15/2012 12:51 AM, Lei Li wrote: > On 10/12/2012 08:39 PM, Gerd Hoffmann wrote: >> This patch adds chardev_add and chardev_del monitor commands. >> >> chardev_del is pretty straight forward, it just takes an id argument a= nd >> zaps the chardev specified. >> >> chardev_add is more tricky as there are tons of arguments for the >> different backends. The hmp version limited to the most common use >> cases, especially when it comes to sockets: You can only specify port= >> (tcp) or path (unix) and qemu will create a listening socket. For >> example this ... >> >> (qemu) chardev_add foo socket 42 >> >> ... will do the same as ... >> >> -chardev socket,id=3Dfoo,port=3D42,server,nowait >> >> on the qemu command line. >> >> The qmp version has full support for everything the -chardev command >> line switch can handle. The implementation is pretty straight >> forward: It just puts all arguments it got into a QemuOpts, then goes >> call qemu_chr_new_from_opts(). >> >> Signed-off-by: Gerd Hoffmann >> +++ b/qapi-schema.json >> @@ -2796,3 +2796,42 @@ >> # Since: 0.14.0 >> ## >> { 'command': 'screendump', 'data': {'filename': 'str'} } >> + >> +## >> +# @chardev_add: The QMP command should be named 'chardev-add'. >> +# >> +# Add a chardev >> +# >> +# @id: the chardev's ID, must be unique >> +# @backend: the chardev backend: "file", "socket", ... Rather than making this an open-coded string, should it instead be a QMP enum value? >> +## >> +# @chardev_del: And this should be 'chardev-del' or even 'chardev-remove', as QMP commands tend to favor legibility over abbreviations. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigB1775A7B4F9E4B8915D2E658 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/ iQEcBAEBCAAGBQJQfEmsAAoJEKeha0olJ0NqtOcH/inAqBgLAvxUN23I7iimMHAP 3vWTG2ZTq9HDBIptj4FYaqPveh/ORtZsYgtjrpQ3j38KuyO04S7Pq4F5ZwKInITG 8i5uIZRx7ycOp8/s8UNqaNNYNL2kZ18HA59me4AILlecBCpCy1fO2mpb1nXjTyL4 0zeV7GQog4uei9o63x1Edsk5zK2DT99m3K6GdwOVP7lRlpZhDTDuXBOYcL2FFYMc o+Jww899PkUi4TjRYKHpFHjnJXScSSpTaOHqXt2KGxHlWSpolHgLY5ogJRNavKTb PMkr031GFe48Z0bQqP0T/JegX6/guEIGrlJS0rfI9ERyq+OA1druJwU8aFcIUqE= =QXIc -----END PGP SIGNATURE----- --------------enigB1775A7B4F9E4B8915D2E658--