From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0qLj-00087M-Sl for qemu-devel@nongnu.org; Mon, 13 Aug 2012 04:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0qLi-0008Ln-QL for qemu-devel@nongnu.org; Mon, 13 Aug 2012 04:50:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0qLi-0008LI-Ht for qemu-devel@nongnu.org; Mon, 13 Aug 2012 04:50:10 -0400 Message-ID: <5028BFBD.7070009@redhat.com> Date: Mon, 13 Aug 2012 16:50:05 +0800 From: Amos Kong MIME-Version: 1.0 References: <1343962122-26696-1-git-send-email-akong@redhat.com> <1343962122-26696-6-git-send-email-akong@redhat.com> <20120803103233.2f48d5d1@doriath.home> In-Reply-To: <20120803103233.2f48d5d1@doriath.home> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 5/7] add the QKeyCode enum and the key_defs table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, eblake@redhat.com, qemu-devel@nongnu.org On 08/03/2012 09:32 PM, Luiz Capitulino wrote: > On Fri, 3 Aug 2012 10:48:40 +0800 > Amos Kong wrote: > >> key_defs[] in monitor.c is a mapping table of keys and keycodes, >> this patch added a QKeyCode enum and a new key_defs table, >> Key's index in the enmu is same as keycode's index in new key_defs[]. >> >> Signed-off-by: Amos Kong >> --- >> input.c | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> qapi-schema.json | 26 ++++++++++ >> 2 files changed, 172 insertions(+), 0 deletions(-) >> >> diff --git a/input.c b/input.c >> index 6968b31..680d756 100644 >> --- a/input.c >> +++ b/input.c >> @@ -37,6 +37,152 @@ static QTAILQ_HEAD(, QEMUPutMouseEntry) mouse_handlers = >> static NotifierList mouse_mode_notifiers = >> NOTIFIER_LIST_INITIALIZER(mouse_mode_notifiers); >> >> +static const int key_defs[] = { > > Weird, I expected this would brake the build, as the new table is unused. > > Anyway, what I suggested in my last review was to do the table move in a > different patch, which includes adding the new accessors, dropping key_defs > from the monitor and doing the necessary changes in the monitor functions > which access key_defs directly. > > This way, the patch converting sendkey() to the qapi does just the > conversion itself (vs. conversion plus refactorings). Ok. I would split convert patch to two patches, and do the refactorings in first patch. Thanks, Amos