qemu/monitor
Philippe Mathieu-Daudé 083b266f69 chardev: Use QEMUChrEvent enum in IOEventHandler typedef
The Chardev events are listed in the QEMUChrEvent enum.

By using the enum in the IOEventHandler typedef we:

- make the IOEventHandler type more explicit (this handler
  process out-of-band information, while the IOReadHandler
  is in-band),
- help static code analyzers.

This patch was produced with the following spatch script:

  @match@
  expression backend, opaque, context, set_open;
  identifier fd_can_read, fd_read, fd_event, be_change;
  @@
  qemu_chr_fe_set_handlers(backend, fd_can_read, fd_read, fd_event,
                           be_change, opaque, context, set_open);

  @depends on match@
  identifier opaque, event;
  identifier match.fd_event;
  @@
   static
  -void fd_event(void *opaque, int event)
  +void fd_event(void *opaque, QEMUChrEvent event)
   {
   ...
   }

Then the typedef was modified manually in
include/chardev/char-fe.h.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20191218172009.8868-15-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-01-08 11:15:35 +01:00
..
hmp-cmds.c Block layer patches: 2019-12-20 18:25:32 +00:00
hmp.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
Makefile.objs monitor: Split out monitor/monitor.c 2019-06-18 08:14:17 +02:00
misc.c Trivial fixes (20191218) 2019-12-20 12:46:10 +00:00
monitor-internal.h Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
monitor.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
qmp-cmds.c monitor/qmp-cmds: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
qmp.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
trace-events monitor: Split out monitor/monitor.c 2019-06-18 08:14:17 +02:00