提交 be733d6d 编写于 作者: M Marc-André Lureau 提交者: Gerd Hoffmann

spice-char: implement chardev port event

Wire up chardev fe_event to Spice port.
Signed-off-by: NMarc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 d61b0c9a
...@@ -222,6 +222,15 @@ static void spice_chr_set_fe_open(struct CharDriverState *chr, int fe_open) ...@@ -222,6 +222,15 @@ static void spice_chr_set_fe_open(struct CharDriverState *chr, int fe_open)
} }
} }
static void spice_chr_fe_event(struct CharDriverState *chr, int event)
{
#if SPICE_SERVER_VERSION >= 0x000c02
SpiceCharDriver *s = chr->opaque;
spice_server_port_event(&s->sin, event);
#endif
}
static void print_allowed_subtypes(void) static void print_allowed_subtypes(void)
{ {
const char** psubtype; const char** psubtype;
...@@ -255,6 +264,7 @@ static CharDriverState *chr_open(const char *subtype) ...@@ -255,6 +264,7 @@ static CharDriverState *chr_open(const char *subtype)
chr->chr_close = spice_chr_close; chr->chr_close = spice_chr_close;
chr->chr_set_fe_open = spice_chr_set_fe_open; chr->chr_set_fe_open = spice_chr_set_fe_open;
chr->explicit_be_open = true; chr->explicit_be_open = true;
chr->chr_fe_event = spice_chr_fe_event;
QLIST_INSERT_HEAD(&spice_chars, s, next); QLIST_INSERT_HEAD(&spice_chars, s, next);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册