aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-09-09 11:10:18 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-09-09 11:10:18 +0000
commit094eed6ca5ce69cb85ac9b778e27da6bf0355173 (patch)
tree70391c7011f218251b35254d8abe6965be8e4ce4 /vl.c
parent9b94dc325b1ab7de421a0419f324d8f8db55aeb4 (diff)
two stop bits support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2148 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index cdfd98c557..45e9417f21 100644
--- 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);
}