qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 2/2] vnc: add change keyboard layout interfa


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH 2/2] vnc: add change keyboard layout interface
Date: Mon, 01 Dec 2014 09:40:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/29/2014 03:39 AM, address@hidden wrote:
> From: Gonglei <address@hidden>
> 
> 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 <address@hidden>
> ---
>  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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]