aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-15 11:17:40 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-22 10:17:44 -0500
commit903396ad3ea8f84b38362134ef7157c82b32071e (patch)
treed9616631c3c3a8d4441250782cecf4fcb84f07d4
parent74c0d6f02048767f05ba671f1b5ca85aad720446 (diff)
char: remove qemu_chr_send_event()
It's dead code. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--console.c16
-rw-r--r--hw/baum.c15
-rw-r--r--qemu-char.c6
-rw-r--r--qemu-char.h2
4 files changed, 0 insertions, 39 deletions
diff --git a/console.c b/console.c
index 553358ba2..500b3fbc7 100644
--- a/console.c
+++ b/console.c
@@ -1102,21 +1102,6 @@ static int console_puts(CharDriverState *chr, const uint8_t *buf, int len)
return len;
}
-static void console_send_event(CharDriverState *chr, int event)
-{
- TextConsole *s = chr->opaque;
- int i;
-
- if (event == CHR_EVENT_FOCUS) {
- for(i = 0; i < nb_consoles; i++) {
- if (consoles[i] == s) {
- console_select(i);
- break;
- }
- }
- }
-}
-
static void kbd_send_chars(void *opaque)
{
TextConsole *s = opaque;
@@ -1462,7 +1447,6 @@ static void text_console_do_init(CharDriverState *chr, DisplayState *ds)
s = chr->opaque;
chr->chr_write = console_puts;
- chr->chr_send_event = console_send_event;
s->out_fifo.buf = s->out_fifo_buf;
s->out_fifo.buf_size = sizeof(s->out_fifo_buf);
diff --git a/hw/baum.c b/hw/baum.c
index 1c6d3e277..86d780a61 100644
--- a/hw/baum.c
+++ b/hw/baum.c
@@ -468,20 +468,6 @@ static int baum_write(CharDriverState *chr, const uint8_t *buf, int len)
return orig_len;
}
-/* The other end sent us some event */
-static void baum_send_event(CharDriverState *chr, int event)
-{
- BaumDriverState *baum = chr->opaque;
- switch (event) {
- case CHR_EVENT_BREAK:
- break;
- case CHR_EVENT_OPENED:
- /* Reset state */
- baum->in_buf_used = 0;
- break;
- }
-}
-
/* Send the key code to the other end */
static void baum_send_key(BaumDriverState *baum, uint8_t type, uint8_t value) {
uint8_t packet[] = { type, value };
@@ -591,7 +577,6 @@ int chr_baum_init(QemuOpts *opts, CharDriverState **_chr)
chr->opaque = baum;
chr->chr_write = baum_write;
- chr->chr_send_event = baum_send_event;
chr->chr_accept_input = baum_accept_input;
chr->chr_close = baum_close;
diff --git a/qemu-char.c b/qemu-char.c
index 2075118f6..c9e5c41dc 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -189,12 +189,6 @@ void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
va_end(ap);
}
-void qemu_chr_send_event(CharDriverState *s, int event)
-{
- if (s->chr_send_event)
- s->chr_send_event(s, event);
-}
-
void qemu_chr_add_handlers(CharDriverState *s,
IOCanReadHandler *fd_can_read,
IOReadHandler *fd_read,
diff --git a/qemu-char.h b/qemu-char.h
index abd9cbdcb..fba02907c 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -62,7 +62,6 @@ struct CharDriverState {
IOCanReadHandler *chr_can_read;
IOReadHandler *chr_read;
void *handler_opaque;
- void (*chr_send_event)(struct CharDriverState *chr, int event);
void (*chr_close)(struct CharDriverState *chr);
void (*chr_accept_input)(struct CharDriverState *chr);
void (*chr_set_echo)(struct CharDriverState *chr, bool echo);
@@ -88,7 +87,6 @@ void qemu_chr_delete(CharDriverState *chr);
void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
GCC_FMT_ATTR(2, 3);
int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len);
-void qemu_chr_send_event(CharDriverState *s, int event);
void qemu_chr_add_handlers(CharDriverState *s,
IOCanReadHandler *fd_can_read,
IOReadHandler *fd_read,