summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/tcflow.c
blob: a35f2ae1a95c7b3675f5806b0507252f0ac11e5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
 *  @file
 *
 *  @brief Line Control Functions
 *  @ingroup Termios
 */

/*
 *  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.org/license/LICENSE.
 */

#ifdef 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,
  int action
)
{
  (void) fd;

  switch (action) {
    case TCOOFF:
    case TCOON:
    case TCIOFF:
    case TCION:
      break;
    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