提交 d3f822d2 编写于 作者: S Shahar Havivi 提交者: Anthony Liguori

Restore terminal monitor attributes - addition

Patch 2d753894 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: NShahar Havivi <shaharh@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 c81131db
......@@ -1002,7 +1002,9 @@ static void tty_serial_init(int fd, int speed,
speed, parity, data_bits, stop_bits);
#endif
tcgetattr (fd, &tty);
if (!term_atexit_done) {
oldtty = tty;
}
#define check_speed(val) if (speed <= val) { spd = B##val; break; }
speed = speed * 10 / 11;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册