From 1c6926c11f2e5efcb166c668b097d64a0321d66e Mon Sep 17 00:00:00 2001 From: Kevin Kirspel Date: Tue, 21 Mar 2017 15:39:48 -0400 Subject: termios: Synchronize with latest FreeBSD headers Adding modified FreeBSD headers to synchronize RTEMS termios with FreeBSD. Modify termios to support dedicated input and output baud for termios structure. Updated BSPs to use dedicated input and output baud in termios structure. Updated tools to use dedicated input and output baud in termios structure. Updated termios testsuites to use dedicated input and output baud in termios structure. Close #2897. --- cpukit/libcsupport/src/termios_setbestbaud.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cpukit/libcsupport/src/termios_setbestbaud.c') diff --git a/cpukit/libcsupport/src/termios_setbestbaud.c b/cpukit/libcsupport/src/termios_setbestbaud.c index 768011892e..d6dcd7f33d 100644 --- a/cpukit/libcsupport/src/termios_setbestbaud.c +++ b/cpukit/libcsupport/src/termios_setbestbaud.c @@ -25,8 +25,7 @@ void rtems_termios_set_best_baud( { const rtems_assoc_t *current = &rtems_termios_baud_table[ 0 ]; const rtems_assoc_t *last = current; - tcflag_t cbaud_mask = CBAUD; - tcflag_t cbaud; + speed_t spd; while ( current->name != NULL && current->local_value < baud ) { last = current; @@ -36,10 +35,11 @@ void rtems_termios_set_best_baud( if ( current->name != NULL ) { uint32_t mid = (last->local_value + current->local_value) / UINT32_C( 2 ); - cbaud = baud <= mid ? last->remote_value : current->remote_value; + spd = baud <= mid ? last->remote_value : current->remote_value; } else { - cbaud = B460800; + spd = B460800; } - term->c_cflag = (term->c_cflag & ~cbaud_mask) | cbaud; + term->c_ispeed = spd; + term->c_ospeed = spd; } -- cgit v1.2.3