[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey
From: |
Amos Kong |
Subject: |
Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey |
Date: |
Wed, 25 Jul 2012 09:56:50 -0400 (EDT) |
----- Original Message -----
> On Wed, 25 Jul 2012 01:55:14 -0400 (EDT)
> Amos Kong <address@hidden> wrote:
>
> >
> >
> > ----- Original Message -----
> > > On Thu, 5 Jul 2012 20:48:44 +0800
> > > Amos Kong <address@hidden> wrote:
> > >
> > > > Convert 'sendkey' to use QAPI. do_sendkey() depends on some
> > > > variables/functions in monitor.c, so reserve qmp_sendkey()
> > > > to monitor.c
> > > >
> > > > key_defs[] in console.h is the mapping of key name to keycode,
> > > > Keys' index in the enmu and key_defs[] is same.
> > > >
> > > > 'send-key' of QMP doesn't support key in hexadecimal format.
> > > >
> > > > Signed-off-by: Amos Kong <address@hidden>
> > > > ---
> > > > console.h | 152 ++++++++++++++++++++++++++++++++++
> > > > hmp-commands.hx | 2 +-
> > > > hmp.c | 64 +++++++++++++++
> > > > hmp.h | 1 +
> > > > monitor.c | 239
> > > > ++++++------------------------------------------------
> > > > qapi-schema.json | 46 +++++++++++
> > > > qmp-commands.hx | 28 +++++++
> > > > 7 files changed, 317 insertions(+), 215 deletions(-)
> >
> > ...
> >
> > > > diff --git a/qapi-schema.json b/qapi-schema.json
> > > > index 3b6e346..08e51c6 100644
> > > > --- a/qapi-schema.json
> > > > +++ b/qapi-schema.json
> > > > @@ -1862,3 +1862,49 @@
> > > > # Since: 0.14.0
> > > > ##
> > > > { 'command': 'netdev_del', 'data': {'id': 'str'} }
> > > > +
> > > > +##
> > > > +# @KeyCodes:
> > >
> > > s/KeyCodes/KeyCode
> >
> >
> > 'KeyCode' is not an available variable name.
> >
> > | ./qapi-types.h:471: error: conflicting types for ‘KeyCode’
> > | /usr/include/X11/X.h:108: note: previous declaration of ‘KeyCode’
> > | was here
> >
> > How about 'CodeOfKey'?
>
> QKeyCode, maybe?
Looks good.
> Can you please paste the full error message?
address@hidden qemu]# make
....
CC slirp/arp_table.o
CC ui/keymaps.o
CC ui/spice-core.o
CC ui/spice-input.o
CC ui/spice-display.o
CC ui/sdl.o
In file included from ./console.h:9,
from ui/sdl.c:32:
./qapi-types.h:471: error: conflicting types for ‘KeyCode’
/usr/include/X11/X.h:108: note: previous declaration of ‘KeyCode’ was here
make: *** [ui/sdl.o] Error 1
address@hidden qemu]#
- [Qemu-devel] [PATCH v4 4/6] qapi: generate list struct and visit_list for enum, (continued)
- [Qemu-devel] [PATCH v4 4/6] qapi: generate list struct and visit_list for enum, Amos Kong, 2012/07/05
- [Qemu-devel] [PATCH v4 6/6] ps2: output warning when event queue full, Amos Kong, 2012/07/05
- [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey, Amos Kong, 2012/07/05
- Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey, Amos Kong, 2012/07/25
- Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey, Luiz Capitulino, 2012/07/25
- Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey,
Amos Kong <=