qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] QEMU monitor banner printed multiple times


From: Marc-André Lureau
Subject: Re: [Qemu-devel] QEMU monitor banner printed multiple times
Date: Wed, 25 Apr 2018 12:12:43 +0200

Hi

On Wed, Apr 25, 2018 at 7:36 AM, Thomas Huth <address@hidden> wrote:
>  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)
> $
>
> 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:

diff --git a/monitor.c b/monitor.c
index 39f8ee17ba..6f4646bf0c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]