Changeset 5f2566b in rtems


Ignore:
Timestamp:
11/02/99 16:27:53 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
3251b55
Parents:
063e4950
Message:

Fixed F_SETFL to properly convert between internal
libio flags and external fcntl.h style flags.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/fcntl.c

    r063e4950 r5f2566b  
    3131  int            fd2;
    3232  int            flags;
     33  int            mask;
    3334  int            ret = 0;
    3435 
     
    9394    case F_SETFL:
    9495      flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
     96      mask = LIBIO_FLAGS_NO_DELAY | LIBIO_FLAGS_APPEND;
    9597
    9698      /*
     
    98100       */
    99101
    100       iop->flags = (iop->flags & ~(O_APPEND | O_NONBLOCK)) |
    101                    (flags & (O_APPEND | O_NONBLOCK));
     102      iop->flags = (iop->flags & ~mask) | (flags & mask);
    102103      break;
    103104
  • c/src/lib/libc/fcntl.c

    r063e4950 r5f2566b  
    3131  int            fd2;
    3232  int            flags;
     33  int            mask;
    3334  int            ret = 0;
    3435 
     
    9394    case F_SETFL:
    9495      flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
     96      mask = LIBIO_FLAGS_NO_DELAY | LIBIO_FLAGS_APPEND;
    9597
    9698      /*
     
    98100       */
    99101
    100       iop->flags = (iop->flags & ~(O_APPEND | O_NONBLOCK)) |
    101                    (flags & (O_APPEND | O_NONBLOCK));
     102      iop->flags = (iop->flags & ~mask) | (flags & mask);
    102103      break;
    103104
  • cpukit/libcsupport/src/fcntl.c

    r063e4950 r5f2566b  
    3131  int            fd2;
    3232  int            flags;
     33  int            mask;
    3334  int            ret = 0;
    3435 
     
    9394    case F_SETFL:
    9495      flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
     96      mask = LIBIO_FLAGS_NO_DELAY | LIBIO_FLAGS_APPEND;
    9597
    9698      /*
     
    98100       */
    99101
    100       iop->flags = (iop->flags & ~(O_APPEND | O_NONBLOCK)) |
    101                    (flags & (O_APPEND | O_NONBLOCK));
     102      iop->flags = (iop->flags & ~mask) | (flags & mask);
    102103      break;
    103104
Note: See TracChangeset for help on using the changeset viewer.