diff options
Diffstat (limited to 'cpukit/libcsupport/src/cfsetispeed.c')
-rw-r--r-- | cpukit/libcsupport/src/cfsetispeed.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/libcsupport/src/cfsetispeed.c b/cpukit/libcsupport/src/cfsetispeed.c index d3a031c049..14e67b9b8b 100644 --- a/cpukit/libcsupport/src/cfsetispeed.c +++ b/cpukit/libcsupport/src/cfsetispeed.c @@ -25,8 +25,7 @@ #include <sys/stat.h> #include <errno.h> #include <termios.h> - -#include <rtems/libio_.h> +#include <rtems/termiostypes.h> #include <rtems/seterr.h> /** @@ -37,10 +36,10 @@ int cfsetispeed( speed_t speed ) { - if ( speed & ~CBAUD ) + if ( rtems_termios_baud_to_index( speed ) == -1 ) rtems_set_errno_and_return_minus_one( EINVAL ); - tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); + tp->c_ispeed = speed; return 0; } #endif |