mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-23 18:12:00 -06:00
monitor: fix muxing
make the mux driver send mux_in and mux_out events when switching focus while hooking up more handlers. stop using CharDriverState->focus in monitor.c, track state using the mux events instead. This also removes the implicit assumtion that a muxed monitor allways has mux channel 0. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
06113719be
commit
a7aec5da4d
2 changed files with 28 additions and 11 deletions
|
@ -456,8 +456,12 @@ static void mux_chr_update_read_handler(CharDriverState *chr)
|
|||
qemu_chr_add_handlers(d->drv, mux_chr_can_read, mux_chr_read,
|
||||
mux_chr_event, chr);
|
||||
}
|
||||
if (chr->focus != -1) {
|
||||
mux_chr_send_event(d, chr->focus, CHR_EVENT_MUX_OUT);
|
||||
}
|
||||
chr->focus = d->mux_cnt;
|
||||
d->mux_cnt++;
|
||||
mux_chr_send_event(d, chr->focus, CHR_EVENT_MUX_IN);
|
||||
}
|
||||
|
||||
static CharDriverState *qemu_chr_open_mux(CharDriverState *drv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue