qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc
Date: Mon, 8 Feb 2016 10:08:12 +0100	[thread overview]
Message-ID: <56B85AFC.3070604@redhat.com> (raw)
In-Reply-To: <56AE2E1B.6030106@ilande.co.uk>



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;

  parent reply	other threads:[~2016-02-08  9:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-31 15:19 [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc Mark Cave-Ayland
2016-01-31 15:34 ` Peter Maydell
2016-01-31 15:54   ` Mark Cave-Ayland
2016-01-31 17:19     ` Paolo Bonzini
2016-01-31 17:54       ` Peter Maydell
2016-01-31 21:57         ` Paolo Bonzini
2016-02-02  7:47           ` Mark Cave-Ayland
2016-02-08  9:08     ` Paolo Bonzini [this message]
2016-02-08 21:44       ` Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56B85AFC.3070604@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).