diff options
Diffstat (limited to 'cpukit/libcsupport/src/tcflush.c')
-rw-r--r-- | cpukit/libcsupport/src/tcflush.c | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/cpukit/libcsupport/src/tcflush.c b/cpukit/libcsupport/src/tcflush.c index d528c2aeb7..1cf5eb61f5 100644 --- a/cpukit/libcsupport/src/tcflush.c +++ b/cpukit/libcsupport/src/tcflush.c @@ -10,39 +10,14 @@ */ #if HAVE_CONFIG_H -#include "config.h" + #include "config.h" #endif -#include <rtems.h> -#if defined(RTEMS_NEWLIB) - -#include <sys/types.h> -#include <sys/stat.h> -#include <errno.h> #include <termios.h> -/* #include <sys/ioctl.h> */ - -#include <rtems/seterr.h> -#include <rtems/libio.h> +#include <stdint.h> +#include <sys/ioccom.h> -int tcflush ( - int fd __attribute__((unused)), - int queue -) +int tcflush( int fd, int queue ) { - switch (queue) { - case TCIFLUSH: - case TCOFLUSH: - case TCIOFLUSH: - default: - rtems_set_errno_and_return_minus_one( EINVAL ); - } - - /* fd is not validated */ - - /* When this is supported, implement it here */ - rtems_set_errno_and_return_minus_one( ENOTSUP ); - return 0; + return ioctl( fd, RTEMS_IO_TCFLUSH, (intptr_t) queue ); } - -#endif |