From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvU27-0005mb-2Y for qemu-devel@nongnu.org; Mon, 01 Dec 2014 11:41:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvU21-0003jQ-IO for qemu-devel@nongnu.org; Mon, 01 Dec 2014 11:41:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvU21-0003jK-Aq for qemu-devel@nongnu.org; Mon, 01 Dec 2014 11:41:01 -0500 Message-ID: <547C9A17.7040609@redhat.com> Date: Mon, 01 Dec 2014 09:40:55 -0700 From: Eric Blake MIME-Version: 1.0 References: <1417257582-1272-1-git-send-email-arei.gonglei@huawei.com> <1417257582-1272-3-git-send-email-arei.gonglei@huawei.com> In-Reply-To: <1417257582-1272-3-git-send-email-arei.gonglei@huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XB9a1m42U0ltN6l9Sf86cfkfxeVmOWeuo" Subject: Re: [Qemu-devel] [RFC PATCH 2/2] vnc: add change keyboard layout interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com, qemu-devel@nongnu.org Cc: weidong.huang@huawei.com, kraxel@redhat.com, peter.huangpeng@huawei.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XB9a1m42U0ltN6l9Sf86cfkfxeVmOWeuo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/29/2014 03:39 AM, arei.gonglei@huawei.com wrote: > From: Gonglei >=20 > Example QMP command of Change VNC keyboard layout: >=20 > -> { "execute": "change", > "arguments": { "device": "vnc", "target": "keymap", > "arg": "de" } } > <- { "return": {} } As I said in the cover letter, we should NOT be adding stuff to the broken 'change' command, but should instead add a new command. >=20 > Signed-off-by: Gonglei > --- > qapi-schema.json | 8 +++++--- > qmp.c | 17 +++++++++++++++++ > 2 files changed, 22 insertions(+), 3 deletions(-) >=20 > diff --git a/qapi-schema.json b/qapi-schema.json > index 9ffdcf8..8c02a9f 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -1552,13 +1552,15 @@ > # > # @target: If @device is a block device, then this is the new filename= =2E > # If @device is 'vnc', then if the value 'password' selects t= he vnc > -# change password command. Otherwise, this specifies a new = server URI > +# change password command, if the value 'keymap'selects the v= nc change s/'keymap'selects/'keymap' selects/ > +# keyboard layout command. Otherwise, this specifies a new se= rver URI > # address to listen to for VNC connections. > # > # @arg: If @device is a block device, then this is an optional form= at to open > # the device with. > -# If @device is 'vnc' and @target is 'password', this is the = new VNC > -# password to set. If this argument is an empty string, then= no future > +# If @device is 'vnc' and if @target is 'password', this is t= he new VNC > +# password to set; if @target is 'keymap', this is the new VN= C keyboard > +# layout to set. If this argument is an empty string, then no= future > # logins will be allowed. Not discoverable. As proposed, libvirt has no way of knowing if qemu is new enough to support this horrible hack. A new command has multiple benefits: it would be discoverable ('query-commands') and type-safe (none of this horrid overloading of special text values). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --XB9a1m42U0ltN6l9Sf86cfkfxeVmOWeuo 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 iQEcBAEBCAAGBQJUfJoXAAoJEKeha0olJ0Nq81sH/iDiaVErC2AEIBrNBg8MhYI0 qcqEmy5Dos5SpPcTOfx8BX9au6vq9YKQH0AdZnuzLz2nbAx55BsKCrW7wBDf5Uam +gW0oiwMg4PT5VAv4AQ8+/lKNVzDIaK6S4slNwG7zWlVMf0AR+GEVAXLzm3E+IBL bca34qOGXY4uj8tN8FXbnq2OsbVQoJrwA9TyU+LHP732r+fQ6e33PBBXPPM1Ta5A M7yuvUzadvnZQssbqvCyjrQKWQKQmOb43oHCDmVcyggQxaPR2Nj5Mb1a6NfH+wOv +Qg+mobsUgZ2IBYWubrfTsbf+tV1QdsS8SEtZfYvOGbk2Ys4cf8vv1aIecLLP60= =DqAV -----END PGP SIGNATURE----- --XB9a1m42U0ltN6l9Sf86cfkfxeVmOWeuo--