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>
Showing
- backends/cryptodev-vhost-user.c 1 addition, 1 deletionbackends/cryptodev-vhost-user.c
- chardev/char-mux.c 1 addition, 1 deletionchardev/char-mux.c
- gdbstub.c 1 addition, 1 deletiongdbstub.c
- hw/arm/pxa2xx.c 1 addition, 1 deletionhw/arm/pxa2xx.c
- hw/arm/strongarm.c 1 addition, 1 deletionhw/arm/strongarm.c
- hw/block/vhost-user-blk.c 1 addition, 1 deletionhw/block/vhost-user-blk.c
- hw/char/cadence_uart.c 1 addition, 1 deletionhw/char/cadence_uart.c
- hw/char/digic-uart.c 1 addition, 1 deletionhw/char/digic-uart.c
- hw/char/escc.c 1 addition, 1 deletionhw/char/escc.c
- hw/char/etraxfs_ser.c 1 addition, 1 deletionhw/char/etraxfs_ser.c
- hw/char/exynos4210_uart.c 1 addition, 1 deletionhw/char/exynos4210_uart.c
- hw/char/grlib_apbuart.c 1 addition, 1 deletionhw/char/grlib_apbuart.c
- hw/char/imx_serial.c 1 addition, 1 deletionhw/char/imx_serial.c
- hw/char/ipoctal232.c 1 addition, 1 deletionhw/char/ipoctal232.c
- hw/char/lm32_juart.c 1 addition, 1 deletionhw/char/lm32_juart.c
- hw/char/lm32_uart.c 1 addition, 1 deletionhw/char/lm32_uart.c
- hw/char/mcf_uart.c 1 addition, 1 deletionhw/char/mcf_uart.c
- hw/char/milkymist-uart.c 1 addition, 1 deletionhw/char/milkymist-uart.c
- hw/char/nrf51_uart.c 1 addition, 1 deletionhw/char/nrf51_uart.c
- hw/char/pl011.c 1 addition, 1 deletionhw/char/pl011.c
Loading
Please register or sign in to comment