Commit 903396ad authored by Anthony Liguori's avatar Anthony Liguori

char: remove qemu_chr_send_event()

It's dead code.
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent 74c0d6f0
......@@ -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);
......
......@@ -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;
......
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment