]> git.proxmox.com Git - qemu.git/commitdiff
Restore terminal monitor attributes - addition
authorShahar Havivi <shaharh@redhat.com>
Sun, 14 Mar 2010 20:41:15 +0000 (22:41 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 31 Mar 2010 16:17:29 +0000 (11:17 -0500)
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 <shaharh@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char.c

index 3e4df8d56c549789092cf0014ddc2b650b5270f1..048da3fec1e70e73b6dd4d404b1ec3f9718bfb41 100644 (file)
@@ -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;