Correct termios2 baud rate calculation

Based on suggestion by joluxer <linuxer@quantentunnel.de>.
This commit is contained in:
Kim Woelders
2021-06-18 15:45:23 +02:00
parent 0606891b78
commit f759c0e3cc
+4 -1
View File
@@ -743,7 +743,10 @@ static unsigned int _tio_baud(const struct termios2 *tio)
static unsigned int _tio2_baud(const struct termios2 *tio2)
{
return tio2->c_ospeed;
if ((tio2->c_cflag & CBAUD) == BOTHER)
return tio2->c_ospeed;
return _tio_baud(tio2);
}
static unsigned int _tio_csize(const struct termios2 *tio)