From: Eric Blake <eblake@redhat.com>
To: arei.gonglei@huawei.com, qemu-devel@nongnu.org
Cc: weidong.huang@huawei.com, kraxel@redhat.com, peter.huangpeng@huawei.com
Subject: Re: [Qemu-devel] [RFC PATCH 2/2] vnc: add change keyboard layout interface
Date: Mon, 01 Dec 2014 09:40:55 -0700 [thread overview]
Message-ID: <547C9A17.7040609@redhat.com> (raw)
In-Reply-To: <1417257582-1272-3-git-send-email-arei.gonglei@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 2309 bytes --]
On 11/29/2014 03:39 AM, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
>
> Example QMP command of Change VNC keyboard layout:
>
> -> { "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.
>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
> qapi-schema.json | 8 +++++---
> qmp.c | 17 +++++++++++++++++
> 2 files changed, 22 insertions(+), 3 deletions(-)
>
> 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.
> # If @device is 'vnc', then if the value 'password' selects the vnc
> -# change password command. Otherwise, this specifies a new server URI
> +# change password command, if the value 'keymap'selects the vnc change
s/'keymap'selects/'keymap' selects/
> +# keyboard layout command. Otherwise, this specifies a new server URI
> # address to listen to for VNC connections.
> #
> # @arg: If @device is a block device, then this is an optional format 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 the new VNC
> +# password to set; if @target is 'keymap', this is the new VNC 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).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]
next prev parent reply other threads:[~2014-12-01 16:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-29 10:39 [Qemu-devel] [RFC PATCH 0/2] Support to change VNC keyboard layout dynamically arei.gonglei
2014-11-29 10:39 ` [Qemu-devel] [RFC PATCH 1/2] vnc: introduce vnc_display_kbd_layout function arei.gonglei
2014-11-29 10:39 ` [Qemu-devel] [RFC PATCH 2/2] vnc: add change keyboard layout interface arei.gonglei
2014-12-01 16:40 ` Eric Blake [this message]
2014-12-02 1:48 ` Gonglei
2014-12-01 16:37 ` [Qemu-devel] [RFC PATCH 0/2] Support to change VNC keyboard layout dynamically Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=547C9A17.7040609@redhat.com \
--to=eblake@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=kraxel@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=weidong.huang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).