From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMK8D-0002kz-7s for qemu-devel@nongnu.org; Thu, 21 Jan 2016 13:38:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMK8A-0002cu-27 for qemu-devel@nongnu.org; Thu, 21 Jan 2016 13:38:53 -0500 Received: from smtp2-g21.free.fr ([212.27.42.2]:59321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMK89-0002cg-TG for qemu-devel@nongnu.org; Thu, 21 Jan 2016 13:38:50 -0500 References: <1453377386-10190-1-git-send-email-berrange@redhat.com> From: =?UTF-8?Q?Herv=c3=a9_Poussineau?= Message-ID: <56A125B4.7050700@reactos.org> Date: Thu, 21 Jan 2016 19:38:44 +0100 MIME-Version: 1.0 In-Reply-To: <1453377386-10190-1-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] gtk: use qemu_chr_alloc() to allocate CharDriverState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Paolo Bonzini , Gerd Hoffmann Le 21/01/2016 12:56, Daniel P. Berrange a =C3=A9crit : > The gd_vc_handler() callback is using g_malloc0() to > allocate the CharDriverState struct. As a result the > logfd field is getting initialized to 0, instead of > -1 when no logfile is requested. > > The result is that when running > > $ qemu-system-i386 -nodefaults -chardev vc,id=3Dmon0 -mon chardev=3Dm= on0 > > qemu duplicates all monitor output to stdout as well > as the GTK window. > > Not using qemu_chr_alloc() was already a bug, but harmless > until this commit > > commit d0d7708ba29cbcc343364a46bff981e0ff88366f > Author: Daniel P. Berrange > Date: Mon Jan 11 12:44:41 2016 +0000 > > qemu-char: add logfile facility to all chardev backends > > which exposed the problem as a behaviour regression > > Reported-by: Herv=C3=A9 Poussineau > Signed-off-by: Daniel P. Berrange Tested-by: Herv=C3=A9 Poussineau Herv=C3=A9