aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-01-08 11:14:29 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-01-08 11:14:49 +0100
commit2fa9044a4fe8c6c9c215785d1abce4db6063a6f9 (patch)
tree09817014d7f69a7b7b8b06ad3e6eaaebe0a7f74f /include
parent71f8d3b0e669b093309b435fda125ce7dcdcd19d (diff)
downloadqemu-2fa9044a4fe8c6c9c215785d1abce4db6063a6f9.zip
qemu-2fa9044a4fe8c6c9c215785d1abce4db6063a6f9.tar.gz
qemu-2fa9044a4fe8c6c9c215785d1abce4db6063a6f9.tar.bz2
chardev: use QEMUChrEvent instead of int
This uses the QEMUChrEvent enum everywhere except in IOEventHandler. The IOEventHandler change needs to happen at once for all front ends and is done with Coccinelle in the next patch. (Extracted from a patch by Philippe Mathieu-Daudé). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/chardev/char-mux.h2
-rw-r--r--include/chardev/char.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/chardev/char-mux.h b/include/chardev/char-mux.h
index 572cefd..417fe32 100644
--- a/include/chardev/char-mux.h
+++ b/include/chardev/char-mux.h
@@ -56,6 +56,6 @@ typedef struct MuxChardev {
object_dynamic_cast(OBJECT(chr), TYPE_CHARDEV_MUX)
void mux_set_focus(Chardev *chr, int focus);
-void mux_chr_send_all_event(Chardev *chr, int event);
+void mux_chr_send_all_event(Chardev *chr, QEMUChrEvent event);
#endif /* CHAR_MUX_H */
diff --git a/include/chardev/char.h b/include/chardev/char.h
index 087b202..00589a6 100644
--- a/include/chardev/char.h
+++ b/include/chardev/char.h
@@ -210,7 +210,7 @@ void qemu_chr_be_update_read_handlers(Chardev *s,
*
* Send an event from the back end to the front end.
*/
-void qemu_chr_be_event(Chardev *s, int event);
+void qemu_chr_be_event(Chardev *s, QEMUChrEvent event);
int qemu_chr_add_client(Chardev *s, int fd);
Chardev *qemu_chr_find(const char *name);
@@ -273,7 +273,7 @@ typedef struct ChardevClass {
void (*chr_accept_input)(Chardev *chr);
void (*chr_set_echo)(Chardev *chr, bool echo);
void (*chr_set_fe_open)(Chardev *chr, int fe_open);
- void (*chr_be_event)(Chardev *s, int event);
+ void (*chr_be_event)(Chardev *s, QEMUChrEvent event);
/* Return 0 if succeeded, 1 if failed */
int (*chr_machine_done)(Chardev *chr);
} ChardevClass;