qemu/net
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
..
can qemu_log_lock/unlock now preserves the qemu_logfile handle. 2019-12-18 20:18:02 +00:00
announce.c net/announce: Add optional ID 2019-07-02 10:21:06 +08:00
checksum.c
clients.h
colo-compare.c COLO-compare: Fix incorrect if logic 2019-10-29 10:28:07 +08:00
colo-compare.h
colo.c
colo.h
dump.c
eth.c
filter-buffer.c
filter-mirror.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
filter-replay.c
filter-rewriter.c
filter.c
hub.c
hub.h
l2tpv3.c
Makefile.objs
net.c net/net: Clean up variable shadowing in net_client_init() 2019-12-18 08:36:16 +01:00
netmap.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
queue.c
slirp.c slirp: Allow non-local DNS address when restrict is off 2019-10-01 19:03:08 +02:00
socket.c
tap-bsd.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
tap-linux.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
tap-linux.h
tap-solaris.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
tap-stub.c
tap-win32.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
tap.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
tap_int.h
trace-events trace: Remove trailing newline in events 2019-09-18 10:19:47 +01:00
util.c
util.h
vde.c
vhost-user-stub.c
vhost-user.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00