diff options
Diffstat (limited to 'chardev')
-rw-r--r-- | chardev/char-mux.c | 8 | ||||
-rw-r--r-- | chardev/char.c | 9 |
2 files changed, 11 insertions, 6 deletions
diff --git a/chardev/char-mux.c b/chardev/char-mux.c index 200c62a0d0..46c44af67c 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; @@ -247,7 +247,7 @@ void mux_chr_send_all_event(Chardev *chr, int event) } } -static void mux_chr_event(void *opaque, int event) +static void mux_chr_event(void *opaque, QEMUChrEvent event) { mux_chr_send_all_event(CHARDEV(opaque), event); } diff --git a/chardev/char.c b/chardev/char.c index e7e7492b0e..87237568df 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -49,7 +49,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; @@ -60,7 +60,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) { @@ -70,6 +70,11 @@ void qemu_chr_be_event(Chardev *s, int event) case CHR_EVENT_CLOSED: s->be_open = 0; break; + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } CHARDEV_GET_CLASS(s)->chr_be_event(s, event); |