From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NqudB-0002wA-T1 for qemu-devel@nongnu.org; Sun, 14 Mar 2010 16:41:49 -0400 Received: from [199.232.76.173] (port=40228 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NqudA-0002v3-Ex for qemu-devel@nongnu.org; Sun, 14 Mar 2010 16:41:48 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nqud9-0000ot-4E for qemu-devel@nongnu.org; Sun, 14 Mar 2010 16:41:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33019) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nqud8-0000ok-MW for qemu-devel@nongnu.org; Sun, 14 Mar 2010 16:41:46 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2EKfjiK014268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 14 Mar 2010 16:41:46 -0400 Received: from localhost (dhcp-1-229.tlv.redhat.com [10.35.1.229]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2EKfiiQ022619 for ; Sun, 14 Mar 2010 16:41:44 -0400 Date: Sun, 14 Mar 2010 22:41:15 +0200 From: Shahar Havivi Message-ID: <20100314204111.GA9351@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] Restore terminal monitor attributes - addition List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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; -- 1.6.3.3