diff options
Diffstat (limited to 'cpukit/libcsupport/src/tcflow.c')
-rw-r--r-- | cpukit/libcsupport/src/tcflow.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/tcflow.c b/cpukit/libcsupport/src/tcflow.c new file mode 100644 index 0000000000..d4d3945f38 --- /dev/null +++ b/cpukit/libcsupport/src/tcflow.c @@ -0,0 +1,44 @@ +/* + * tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions + * + * COPYRIGHT (c) 1989-2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#if defined(RTEMS_NEWLIB) +#include <termios.h> +#include <unistd.h> +#include <errno.h> +#include <rtems/seterr.h> + +int tcflow ( + int fd __attribute__((unused)), + int action +) +{ + switch (action) { + case TCOOFF: + case TCOON: + case TCIOFF: + case TCION: + 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 ); +} + +#endif |