diff options
-rw-r--r-- | chardev/char.c | 1 | ||||
-rw-r--r-- | include/chardev/char.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/chardev/char.c b/chardev/char.c index e090dd5a27..89eabea5ac 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -185,6 +185,7 @@ void qemu_chr_be_update_read_handlers(Chardev *s, { ChardevClass *cc = CHARDEV_GET_CLASS(s); + s->gcontext = context; if (cc->chr_update_read_handler) { cc->chr_update_read_handler(s, context); } diff --git a/include/chardev/char.h b/include/chardev/char.h index 2068ea496d..84fb773591 100644 --- a/include/chardev/char.h +++ b/include/chardev/char.h @@ -55,6 +55,7 @@ struct Chardev { int logfd; int be_open; GSource *gsource; + GMainContext *gcontext; DECLARE_BITMAP(features, QEMU_CHAR_FEATURE_LAST); }; |