From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xvcak-0006vA-6o for qemu-devel@nongnu.org; Mon, 01 Dec 2014 20:49:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xvcaf-0008TN-DK for qemu-devel@nongnu.org; Mon, 01 Dec 2014 20:49:26 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:21607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xvcae-0008Sc-Oy for qemu-devel@nongnu.org; Mon, 01 Dec 2014 20:49:21 -0500 Message-ID: <547D1A81.6050206@huawei.com> Date: Tue, 2 Dec 2014 09:48:49 +0800 From: Gonglei 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> <547C9A17.7040609@redhat.com> In-Reply-To: <547C9A17.7040609@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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: Eric Blake Cc: "Huangpeng (Peter)" , "Huangweidong (C)" , "qemu-devel@nongnu.org" , "kraxel@redhat.com" On 2014/12/2 0:40, Eric Blake wrote: > On 11/29/2014 03:39 AM, arei.gonglei@huawei.com wrote: >> From: Gonglei >> >> 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. > OK. >> >> Signed-off-by: Gonglei >> --- >> 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). > Great! Thank you so much for your comments, Eric. I will add a new QMP command for this. Regards, -Gonglei