aboutsummaryrefslogtreecommitdiff
path: root/chardev
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 /chardev
parent71f8d3b0e669b093309b435fda125ce7dcdcd19d (diff)
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 'chardev')
-rw-r--r--chardev/char-mux.c6
-rw-r--r--chardev/char.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/chardev/char-mux.c b/chardev/char-mux.c
index 200c62a0d0..2675ae0c0a 100644
--- a/chardev/char-mux.c
+++ b/chardev/char-mux.c
@@ -117,7 +117,7 @@ static void mux_print_help(Chardev *chr)
}
}
-static void mux_chr_send_event(MuxChardev *d, int mux_nr, int event)
+static void mux_chr_send_event(MuxChardev *d, int mux_nr, QEMUChrEvent event)
{
CharBackend *be = d->backends[mux_nr];
@@ -126,7 +126,7 @@ static void mux_chr_send_event(MuxChardev *d, int mux_nr, int event)
}
}
-static void mux_chr_be_event(Chardev *chr, int event)
+static void mux_chr_be_event(Chardev *chr, QEMUChrEvent event)
{
MuxChardev *d = MUX_CHARDEV(chr);
@@ -232,7 +232,7 @@ static void mux_chr_read(void *opaque, const uint8_t *buf, int size)
}
}
-void mux_chr_send_all_event(Chardev *chr, int event)
+void mux_chr_send_all_event(Chardev *chr, QEMUChrEvent event)
{
MuxChardev *d = MUX_CHARDEV(chr);
int i;
diff --git a/chardev/char.c b/chardev/char.c
index 739da1155b..4f598f8175 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -48,7 +48,7 @@ static Object *get_chardevs_root(void)
return container_get(object_get_root(), "/chardevs");
}
-static void chr_be_event(Chardev *s, int event)
+static void chr_be_event(Chardev *s, QEMUChrEvent event)
{
CharBackend *be = s->be;
@@ -59,7 +59,7 @@ static void chr_be_event(Chardev *s, int event)
be->chr_event(be->opaque, event);
}
-void qemu_chr_be_event(Chardev *s, int event)
+void qemu_chr_be_event(Chardev *s, QEMUChrEvent event)
{
/* Keep track if the char device is open */
switch (event) {