]> xenbits.xensource.com Git - qemu-xen-4.4-testing.git/commitdiff
two stop bits support
authorbellard <bellard>
Sat, 9 Sep 2006 11:10:18 +0000 (11:10 +0000)
committerbellard <bellard>
Sat, 9 Sep 2006 11:10:18 +0000 (11:10 +0000)
vl.c

diff --git a/vl.c b/vl.c
index cdfd98c55707577892e8199c3f8e07c6fcff01ac..45e9417f211cb8bf306dffc01b3fa1d05059f2a0 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -1598,7 +1598,7 @@ static void tty_serial_init(int fd, int speed,
                           |INLCR|IGNCR|ICRNL|IXON);
     tty.c_oflag |= OPOST;
     tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN|ISIG);
-    tty.c_cflag &= ~(CSIZE|PARENB|PARODD|CRTSCTS);
+    tty.c_cflag &= ~(CSIZE|PARENB|PARODD|CRTSCTS|CSTOPB);
     switch(data_bits) {
     default:
     case 8:
@@ -1625,6 +1625,8 @@ static void tty_serial_init(int fd, int speed,
         tty.c_cflag |= PARENB | PARODD;
         break;
     }
+    if (stop_bits == 2)
+        tty.c_cflag |= CSTOPB;
     
     tcsetattr (fd, TCSANOW, &tty);
 }