summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/tcflow.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/tcflow.c')
-rw-r--r--cpukit/libcsupport/src/tcflow.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/cpukit/libcsupport/src/tcflow.c b/cpukit/libcsupport/src/tcflow.c
index b329224b45..d4d3945f38 100644
--- a/cpukit/libcsupport/src/tcflow.c
+++ b/cpukit/libcsupport/src/tcflow.c
@@ -1,7 +1,7 @@
/*
* tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -18,12 +18,27 @@
#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 __attribute__((unused)))
+ int action
+)
{
- return 0;
+ 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