Changeset fab27e47 in rtems


Ignore:
Timestamp:
Jun 7, 2010, 6:37:16 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
cfde6479
Parents:
9f5f6f53
Message:

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.
Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r9f5f6f53 rfab27e47  
     12010-06-07      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * libcsupport/src/tcflow.c, libcsupport/src/tcflush.c: Add switches
     4        to detect bad input.
     5        * libcsupport/src/tcsetpgrp.c: Fix typo.
     6
    172010-06-07      Sebastian Huber <sebastian.huber@embedded-brains.de>
    28
  • cpukit/libcsupport/src/tcflow.c

    r9f5f6f53 rfab27e47  
    22 *  tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions
    33 *
    4  *  COPYRIGHT (c) 1989-1999.
     4 *  COPYRIGHT (c) 1989-2010.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    1919#include <termios.h>
    2020#include <unistd.h>
     21#include <errno.h>
     22#include <rtems/seterr.h>
    2123
    2224int tcflow (
    2325  int fd __attribute__((unused)),
    24   int action __attribute__((unused)))
     26  int action
     27)
    2528{
    26   return 0;
     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 );
    2742}
    2843
  • cpukit/libcsupport/src/tcflush.c

    r9f5f6f53 rfab27e47  
    22 *  tcflush() - POSIX 1003.1b 7.2.2 - Line Control Functions
    33 *
    4  *  COPYRIGHT (c) 1989-1999.
     4 *  COPYRIGHT (c) 1989-2010.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    2525/* #include <sys/ioctl.h> */
    2626
     27#include <rtems/seterr.h>
    2728#include <rtems/libio.h>
    2829
    2930int tcflush (
    3031  int fd __attribute__((unused)),
    31   int queue __attribute__((unused)) )
     32  int queue
     33)
    3234{
     35  switch (queue) {
     36    case TCIFLUSH:
     37    case TCOFLUSH:
     38    case TCIOFLUSH:
     39    default:
     40      rtems_set_errno_and_return_minus_one( EINVAL );
     41  }
     42
     43  /* fd is not validated */
     44
     45  /* When this is supported, implement it here */
     46  rtems_set_errno_and_return_minus_one( ENOTSUP );
    3347  return 0;
    3448}
  • cpukit/libcsupport/src/tcsetpgrp.c

    r9f5f6f53 rfab27e47  
    22 *  tcsetprgrp() - POSIX 1003.1b 7.2.4 - Set Foreground Process Group ID
    33 *
    4  *  COPYRIGHT (c) 1989-1999.
     4 *  COPYRIGHT (c) 1989-2010.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    2727#include <rtems/libio.h>
    2828
    29 int tcsetprgrp(
     29int tcsetpgrp(
    3030  int fd __attribute__((unused)),
    3131  pid_t pid __attribute__((unused)) )
Note: See TracChangeset for help on using the changeset viewer.