Correct termios2 baud rate calculation
Based on suggestion by joluxer <linuxer@quantentunnel.de>.
This commit is contained in:
+4
-1
@@ -743,7 +743,10 @@ static unsigned int _tio_baud(const struct termios2 *tio)
|
|||||||
|
|
||||||
static unsigned int _tio2_baud(const struct termios2 *tio2)
|
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)
|
static unsigned int _tio_csize(const struct termios2 *tio)
|
||||||
|
|||||||
Reference in New Issue
Block a user