Commit 094eed6ca5ce69cb85ac9b778e27da6bf0355173
1 parent
9b94dc32
two stop bits support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2148 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
1 deletions
vl.c
... | ... | @@ -1598,7 +1598,7 @@ static void tty_serial_init(int fd, int speed, |
1598 | 1598 | |INLCR|IGNCR|ICRNL|IXON); |
1599 | 1599 | tty.c_oflag |= OPOST; |
1600 | 1600 | tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN|ISIG); |
1601 | - tty.c_cflag &= ~(CSIZE|PARENB|PARODD|CRTSCTS); | |
1601 | + tty.c_cflag &= ~(CSIZE|PARENB|PARODD|CRTSCTS|CSTOPB); | |
1602 | 1602 | switch(data_bits) { |
1603 | 1603 | default: |
1604 | 1604 | case 8: |
... | ... | @@ -1625,6 +1625,8 @@ static void tty_serial_init(int fd, int speed, |
1625 | 1625 | tty.c_cflag |= PARENB | PARODD; |
1626 | 1626 | break; |
1627 | 1627 | } |
1628 | + if (stop_bits == 2) | |
1629 | + tty.c_cflag |= CSTOPB; | |
1628 | 1630 | |
1629 | 1631 | tcsetattr (fd, TCSANOW, &tty); |
1630 | 1632 | } | ... | ... |