diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-12-12 09:36:02 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-12-13 11:36:37 +0100 |
commit | ad13ebe071fa9ce99824ee7a88b396d27add79b9 (patch) | |
tree | f83ebfe030d83f6c73212bb2bc717991ba5e146a | |
parent | libcsupport: Revert documentation changes (diff) | |
download | rtems-ad13ebe071fa9ce99824ee7a88b396d27add79b9.tar.bz2 |
termios: Fix tcflow() error status
-rw-r--r-- | cpukit/libcsupport/src/tcflow.c | 1 | ||||
-rw-r--r-- | testsuites/libtests/termios02/init.c | 19 |
2 files changed, 13 insertions, 7 deletions
diff --git a/cpukit/libcsupport/src/tcflow.c b/cpukit/libcsupport/src/tcflow.c index c445ffb04f..7de2e98cdf 100644 --- a/cpukit/libcsupport/src/tcflow.c +++ b/cpukit/libcsupport/src/tcflow.c @@ -34,6 +34,7 @@ int tcflow ( case TCOON: case TCIOFF: case TCION: + break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } diff --git a/testsuites/libtests/termios02/init.c b/testsuites/libtests/termios02/init.c index 7659314960..92e37add1c 100644 --- a/testsuites/libtests/termios02/init.c +++ b/testsuites/libtests/termios02/init.c @@ -47,35 +47,40 @@ rtems_task Init( tcdrain(2); rtems_test_assert( !sc ); - puts( "" ); + puts( "" ); /***** TEST TCFLOW *****/ puts( "tcflow(stdin, TCOOFF) - ENOTSUP" ); + errno = 0; sc = tcflow( 0, TCOOFF ); rtems_test_assert( sc == -1 ); - rtems_test_assert( errno = ENOTSUP ); + rtems_test_assert( errno == ENOTSUP ); puts( "tcflow(stdin, TCOON) - ENOTSUP" ); + errno = 0; sc = tcflow( 0, TCOON ); rtems_test_assert( sc == -1 ); - rtems_test_assert( errno = ENOTSUP ); + rtems_test_assert( errno == ENOTSUP ); puts( "tcflow(stdin, TCIOFF) - ENOTSUP" ); + errno = 0; sc = tcflow( 0, TCIOFF ); rtems_test_assert( sc == -1 ); - rtems_test_assert( errno = ENOTSUP ); + rtems_test_assert( errno == ENOTSUP ); puts( "tcflow(stdin, TCION) - ENOTSUP" ); + errno = 0; sc = tcflow( 0, TCION ); rtems_test_assert( sc == -1 ); - rtems_test_assert( errno = ENOTSUP ); + rtems_test_assert( errno == ENOTSUP ); puts( "tcflow(stdin, 22) - EINVAL" ); + errno = 0; sc = tcflow( 0, 22 ); rtems_test_assert( sc == -1 ); - rtems_test_assert( errno = EINVAL ); + rtems_test_assert( errno == EINVAL ); - puts( "" ); + puts( "" ); /***** TEST TCFLUSH *****/ puts( "tcflush(stdin, TCIFLUSH) - ENOTSUP" ); |