From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nx0zt-0001vY-Sr for qemu-devel@nongnu.org; Wed, 31 Mar 2010 12:42:29 -0400 Received: from [140.186.70.92] (port=39705 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nx0zs-0001tN-GS for qemu-devel@nongnu.org; Wed, 31 Mar 2010 12:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nx0zp-0004WI-DO for qemu-devel@nongnu.org; Wed, 31 Mar 2010 12:42:28 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:62581) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nx0zp-0004WA-9n for qemu-devel@nongnu.org; Wed, 31 Mar 2010 12:42:25 -0400 Received: by gwaa20 with SMTP id a20so161055gwa.4 for ; Wed, 31 Mar 2010 09:42:24 -0700 (PDT) Message-ID: <4BB37B6B.5030105@codemonkey.ws> Date: Wed, 31 Mar 2010 11:42:19 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Restore terminal monitor attributes - addition References: <20100314204111.GA9351@redhat.com> In-Reply-To: <20100314204111.GA9351@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Shahar Havivi Cc: qemu-devel@nongnu.org On 03/14/2010 03:41 PM, Shahar Havivi wrote: > Patch 2d753894c7553d6a05e8fdbed5f4704398919a35 was missing this check, > when running monitor as /dev/tty and other serial device, i.e: > qemu -monitor /dev/tty -serial /dev/pts/1 > > Without this patch any serial device will override the monitor stored > attributes. (monitor is called in main() before any serial device). > > Signed-off-by: Shahar Havivi > Applied. Thanks. Regards, Anthony Liguori > --- > qemu-char.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index 0e25ef3..4bf1e82 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -1002,7 +1002,9 @@ static void tty_serial_init(int fd, int speed, > speed, parity, data_bits, stop_bits); > #endif > tcgetattr (fd,&tty); > - oldtty = tty; > + if (!term_atexit_done) { > + oldtty = tty; > + } > > #define check_speed(val) if (speed<= val) { spd = B##val; break; } > speed = speed * 10 / 11; >