aboutsummaryrefslogtreecommitdiff
path: root/chardev/char.c
diff options
context:
space:
mode:
Diffstat (limited to 'chardev/char.c')
-rw-r--r--chardev/char.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/chardev/char.c b/chardev/char.c
index b6fd5eb6a6..2ae4f465ec 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -180,6 +180,17 @@ void qemu_chr_be_write(Chardev *s, uint8_t *buf, int len)
}
}
+void qemu_chr_be_update_read_handlers(Chardev *s,
+ GMainContext *context)
+{
+ ChardevClass *cc = CHARDEV_GET_CLASS(s);
+
+ s->gcontext = context;
+ if (cc->chr_update_read_handler) {
+ cc->chr_update_read_handler(s);
+ }
+}
+
int qemu_chr_add_client(Chardev *s, int fd)
{
return CHARDEV_GET_CLASS(s)->chr_add_client ?