diff mbox

Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc

Message ID 56B85AFC.3070604@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paolo Bonzini Feb. 8, 2016, 9:08 a.m. UTC
On 31/01/2016 16:54, Mark Cave-Ayland wrote:
> Aha! A quick test here shows that the patch fixes the serial port
> appearing on stdout and entering the monitor, but I still see the
> multiple echo problem in the GTK GUI.

And this should be it; if this fixes all your problems I will submit
it for inclusion.

Thanks,

Paolo

----------------- 8< ---------------
From: Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH] gtk: fix uninitialized temporary VirtualConsole

Only the echo field is used in the temporary VirtualConsole, so the
damage was limited.  But still, if echo was incorrectly set to true,
the result would be some puzzling output in VTE monitor and serial
consoles.

Fixes: fba958c692e47a373d15c1fd3d72b255bf76adbd
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Comments

Mark Cave-Ayland Feb. 8, 2016, 9:44 p.m. UTC | #1
On 08/02/16 09:08, Paolo Bonzini wrote:

> On 31/01/2016 16:54, Mark Cave-Ayland wrote:
>> Aha! A quick test here shows that the patch fixes the serial port
>> appearing on stdout and entering the monitor, but I still see the
>> multiple echo problem in the GTK GUI.
> 
> And this should be it; if this fixes all your problems I will submit
> it for inclusion.
> 
> Thanks,
> 
> Paolo
> 
> ----------------- 8< ---------------
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH] gtk: fix uninitialized temporary VirtualConsole
> 
> Only the echo field is used in the temporary VirtualConsole, so the
> damage was limited.  But still, if echo was incorrectly set to true,
> the result would be some puzzling output in VTE monitor and serial
> consoles.
> 
> Fixes: fba958c692e47a373d15c1fd3d72b255bf76adbd
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> diff --git a/ui/gtk.c b/ui/gtk.c
> index c8dbd5c..e106493 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -1612,7 +1612,7 @@ static CharDriverState *gd_vc_handler(ChardevVC *vc, Error **errp)
>      chr->chr_set_echo = gd_vc_chr_set_echo;
>  
>      /* Temporary, until gd_vc_vte_init runs.  */
> -    chr->opaque = g_new(VirtualConsole, 1);
> +    chr->opaque = g_new0(VirtualConsole, 1);
>  
>      /* defer OPENED events until our vc is fully initialized */
>      chr->explicit_be_open = true;

Hi Paolo,

Thanks for the patch, I can confirm it fixes the local echo issue for
me. However I still see one more issue in the GTK monitor (I seem to be
doing well here) whereby the width of the GTK console changes size.

With git master, I start up qemu-system-ppc with the GTK interface,
switch to the monitor and type help which gives this output:
https://www.ilande.co.uk/tmp/help1.png. If I then type help again then
the output looks like https://www.ilande.co.uk/tmp/help2.png. In effect,
it looks like the width of the window is 3 characters too wide but only
for the first command.


ATB,

Mark.
diff mbox

Patch

diff --git a/ui/gtk.c b/ui/gtk.c
index c8dbd5c..e106493 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1612,7 +1612,7 @@  static CharDriverState *gd_vc_handler(ChardevVC *vc, Error **errp)
     chr->chr_set_echo = gd_vc_chr_set_echo;
 
     /* Temporary, until gd_vc_vte_init runs.  */
-    chr->opaque = g_new(VirtualConsole, 1);
+    chr->opaque = g_new0(VirtualConsole, 1);
 
     /* defer OPENED events until our vc is fully initialized */
     chr->explicit_be_open = true;