source: rtems/cpukit/libcsupport/src/tcflow.c @ 92119ed

4.115
Last change on this file since 92119ed was fab27e47, checked in by Joel Sherrill <joel.sherrill@…>, on 06/07/10 at 18:37:16

2010-06-07 Joel Sherrill <joel.sherrill@…>

  • libcsupport/src/tcflow.c, libcsupport/src/tcflush.c: Add switches to detect bad input.
  • libcsupport/src/tcsetpgrp.c: Fix typo.
  • Property mode set to 100644
File size: 848 bytes
Line 
1/*
2 *  tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions
3 *
4 *  COPYRIGHT (c) 1989-2010.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#if HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#if defined(RTEMS_NEWLIB)
19#include <termios.h>
20#include <unistd.h>
21#include <errno.h>
22#include <rtems/seterr.h>
23
24int tcflow (
25  int fd __attribute__((unused)),
26  int action
27)
28{
29  switch (action) {
30    case TCOOFF:
31    case TCOON:
32    case TCIOFF:
33    case TCION:
34    default:
35      rtems_set_errno_and_return_minus_one( EINVAL );
36  }
37
38  /* fd is not validated */
39
40  /* When this is supported, implement it here */
41  rtems_set_errno_and_return_minus_one( ENOTSUP );
42}
43
44#endif
Note: See TracBrowser for help on using the repository browser.