mirror of https://gitee.com/openkylin/qemu.git
char: remove qemu_chr_be_generic_open
The function simply alias and hides the real event function. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
parent
e619b14746
commit
6361813527
|
@ -185,7 +185,7 @@ static gboolean qemu_chr_be_generic_open_func(gpointer opaque)
|
||||||
PtyChardev *s = PTY_CHARDEV(opaque);
|
PtyChardev *s = PTY_CHARDEV(opaque);
|
||||||
|
|
||||||
s->open_tag = 0;
|
s->open_tag = 0;
|
||||||
qemu_chr_be_generic_open(chr);
|
qemu_chr_be_event(chr, CHR_EVENT_OPENED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -489,7 +489,7 @@ static void tcp_chr_connect(void *opaque)
|
||||||
tcp_chr_read,
|
tcp_chr_read,
|
||||||
chr, NULL);
|
chr, NULL);
|
||||||
}
|
}
|
||||||
qemu_chr_be_generic_open(chr);
|
qemu_chr_be_event(chr, CHR_EVENT_OPENED);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tcp_chr_update_read_handler(Chardev *chr,
|
static void tcp_chr_update_read_handler(Chardev *chr,
|
||||||
|
|
|
@ -66,12 +66,6 @@ void qemu_chr_be_event(Chardev *s, int event)
|
||||||
be->chr_event(be->opaque, event);
|
be->chr_event(be->opaque, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qemu_chr_be_generic_open(Chardev *s)
|
|
||||||
{
|
|
||||||
qemu_chr_be_event(s, CHR_EVENT_OPENED);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Not reporting errors from writing to logfile, as logs are
|
/* Not reporting errors from writing to logfile, as logs are
|
||||||
* defined to be "best effort" only */
|
* defined to be "best effort" only */
|
||||||
static void qemu_chr_fe_write_log(Chardev *s,
|
static void qemu_chr_fe_write_log(Chardev *s,
|
||||||
|
@ -469,7 +463,7 @@ static void muxes_realize_done(Notifier *notifier, void *unused)
|
||||||
/* mark mux as OPENED so any new FEs will immediately receive
|
/* mark mux as OPENED so any new FEs will immediately receive
|
||||||
* OPENED event
|
* OPENED event
|
||||||
*/
|
*/
|
||||||
qemu_chr_be_generic_open(chr);
|
qemu_chr_be_event(chr, CHR_EVENT_OPENED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
muxes_realized = true;
|
muxes_realized = true;
|
||||||
|
@ -581,7 +575,7 @@ void qemu_chr_fe_set_handlers(CharBackend *b,
|
||||||
/* We're connecting to an already opened device, so let's make sure we
|
/* We're connecting to an already opened device, so let's make sure we
|
||||||
also get the open event */
|
also get the open event */
|
||||||
if (s->be_open) {
|
if (s->be_open) {
|
||||||
qemu_chr_be_generic_open(s);
|
qemu_chr_be_event(s, CHR_EVENT_OPENED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -427,7 +427,6 @@ void qemu_chr_fe_set_handlers(CharBackend *b,
|
||||||
*/
|
*/
|
||||||
void qemu_chr_fe_take_focus(CharBackend *b);
|
void qemu_chr_fe_take_focus(CharBackend *b);
|
||||||
|
|
||||||
void qemu_chr_be_generic_open(Chardev *s);
|
|
||||||
void qemu_chr_fe_accept_input(CharBackend *be);
|
void qemu_chr_fe_accept_input(CharBackend *be);
|
||||||
int qemu_chr_add_client(Chardev *s, int fd);
|
int qemu_chr_add_client(Chardev *s, int fd);
|
||||||
Chardev *qemu_chr_find(const char *name);
|
Chardev *qemu_chr_find(const char *name);
|
||||||
|
|
|
@ -2076,7 +2076,7 @@ static void text_console_do_init(Chardev *chr, DisplayState *ds)
|
||||||
s->t_attrib = s->t_attrib_default;
|
s->t_attrib = s->t_attrib_default;
|
||||||
}
|
}
|
||||||
|
|
||||||
qemu_chr_be_generic_open(chr);
|
qemu_chr_be_event(chr, CHR_EVENT_OPENED);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vc_chr_open(Chardev *chr,
|
static void vc_chr_open(Chardev *chr,
|
||||||
|
|
2
ui/gtk.c
2
ui/gtk.c
|
@ -1868,7 +1868,7 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc,
|
||||||
gtk_notebook_append_page(GTK_NOTEBOOK(s->notebook), vc->tab_item,
|
gtk_notebook_append_page(GTK_NOTEBOOK(s->notebook), vc->tab_item,
|
||||||
gtk_label_new(vc->label));
|
gtk_label_new(vc->label));
|
||||||
|
|
||||||
qemu_chr_be_generic_open(vc->vte.chr);
|
qemu_chr_be_event(vc->vte.chr, CHR_EVENT_OPENED);
|
||||||
|
|
||||||
return group;
|
return group;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue