QEMU monitor banner printed multiple times
Hi,
I just noticed that sometimes, the QEMU monitor banner is printed multiple times when you press "CTRL-a c" to enter the monitor:
$ x86_64-softmmu/qemu-system-x86_64 -no-shutdown -nographic \
-nodefaults -virtioconsole mon:stdio
QEMU 2.12.0 monitor - type 'help' for more information
QEMU 2.12.0 monitor - type 'help' for more information
QEMU 2.12.0 monitor - type 'help' for more information
QEMU 2.12.0 monitor - type 'help' for more information
(qemu) q
QEMU 2.12.0 monitor - type 'help' for more information
(qemu)
$That looks quite ugly. Anybody got an idea how to fix this?
Thomas
Hi
Quoted 16 lines · Thomas Huth
Hi,
I just noticed that sometimes, the QEMU monitor banner is printed multiple times when you press "CTRL-a c" to enter the monitor:
$ x86_64-softmmu/qemu-system-x86_64 -no-shutdown -nographic \ -nodefaults - mon:stdio QEMU 2.12.0 monitor - type 'help' for more information QEMU 2.12.0 monitor - type 'help' for more information QEMU 2.12.0 monitor - type 'help' for more information QEMU 2.12.0 monitor - type 'help' for more information (qemu) q QEMU 2.12.0 monitor - type 'help' for more information (qemu) $
Quoted 1 line
That looks quite ugly. Anybody got an idea how to fix this?
virtio console creates many extra events.
It's not so trivial to fix given how mux works.
What seems easy and probably safe is the following change:
monitor.c +4 -3
@@ -4411,8 +4411,10 @@ static void monitor_event(void *opaque, int event)break ;case CHR_EVENT_OPENED : -monitor_printf (mon,"QEMU %s monitor - type 'help' for more " -"information\n" ,QEMU_VERSION ); +if (!mon->reset_seen) { +monitor_printf (mon,"QEMU %s monitor - type 'help' for more " +"information\n" ,QEMU_VERSION ); + } --
Marc-André Lureau