Changeset e2b1db23 in rtems


Ignore:
Timestamp:
Sep 13, 2017, 11:30:30 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
bbcdc302
Parents:
ca90c6c
git-author:
Sebastian Huber <sebastian.huber@…> (09/13/17 11:30:30)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/15/17 08:27:12)
Message:

libio: Add rtems_libio_iop_flags()

Update #3132.

Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/include/rtems/libio.h

    rca90c6c re2b1db23  
    13751375/** @} */
    13761376
     1377static inline uint32_t rtems_libio_iop_flags( const rtems_libio_t *iop )
     1378{
     1379  return iop->flags;
     1380}
     1381
    13771382/**
    13781383 * @name External I/O Handlers
  • cpukit/libcsupport/src/fcntl.c

    rca90c6c re2b1db23  
    3131  rtems_libio_t *diop;
    3232
    33   oflag = rtems_libio_to_fcntl_flags( iop->flags );
     33  oflag = rtems_libio_to_fcntl_flags( rtems_libio_iop_flags( iop ) );
    3434  diop = rtems_libio_allocate();
    3535
     
    7373    int oflag;
    7474
    75     if ((iop2->flags & LIBIO_FLAGS_OPEN) != 0) {
     75    if ((rtems_libio_iop_flags( iop2 ) & LIBIO_FLAGS_OPEN) != 0) {
    7676      rv = (*iop2->pathinfo.handlers->close_h)( iop2 );
    7777    }
    7878
    7979    if (rv == 0) {
    80       oflag = rtems_libio_to_fcntl_flags( iop->flags );
     80      oflag = rtems_libio_to_fcntl_flags( rtems_libio_iop_flags( iop ) );
    8181      rtems_libio_iop_flags_set( iop2, rtems_libio_fcntl_flags( oflag ) );
    8282
     
    136136
    137137    case F_GETFD:        /* get f_flags */
    138       ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
     138      ret = ((rtems_libio_iop_flags(iop) & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
    139139      break;
    140140
     
    155155
    156156    case F_GETFL:        /* more flags (cloexec) */
    157       ret = rtems_libio_to_fcntl_flags( iop->flags );
     157      ret = rtems_libio_to_fcntl_flags( rtems_libio_iop_flags( iop ) );
    158158      break;
    159159
  • cpukit/libfs/src/pipe/fifo.c

    rca90c6c re2b1db23  
    3232#include "pipe.h"
    3333
    34 #define LIBIO_ACCMODE(_iop) ((_iop)->flags & LIBIO_FLAGS_READ_WRITE)
     34#define LIBIO_ACCMODE(_iop) (rtems_libio_iop_flags(_iop) & LIBIO_FLAGS_READ_WRITE)
    3535#define LIBIO_NODELAY(_iop) ((_iop)->flags & LIBIO_FLAGS_NO_DELAY)
    3636
  • cpukit/libnetworking/rtems/rtems_syscall.c

    rca90c6c re2b1db23  
    5353
    5454  /* same as rtems_libio_check_is_open(iop) but different return */
    55   if ((iop->flags & LIBIO_FLAGS_OPEN) == 0) {
     55  if ((rtems_libio_iop_flags(iop) & LIBIO_FLAGS_OPEN) == 0) {
    5656    errno = EBADF;
    5757    return NULL;
Note: See TracChangeset for help on using the changeset viewer.