diff options
Diffstat (limited to 'c/src/exec/libcsupport/src/libio.c')
-rw-r--r-- | c/src/exec/libcsupport/src/libio.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/c/src/exec/libcsupport/src/libio.c b/c/src/exec/libcsupport/src/libio.c index 59b7086a03..bedd4a920e 100644 --- a/c/src/exec/libcsupport/src/libio.c +++ b/c/src/exec/libcsupport/src/libio.c @@ -147,6 +147,24 @@ unsigned32 rtems_libio_fcntl_flags( } /* + * rtems_libio_to_fcntl_flags + * + * Convert RTEMS internal flags to UNIX fnctl(2) flags + */ + +unsigned32 rtems_libio_to_fcntl_flags( + unsigned32 flags +) +{ + unsigned32 fcntl_flags = 0; + + fcntl_flags = rtems_assoc_remote_by_local( access_modes_assoc, flags ); + fcntl_flags |= + rtems_assoc_remote_by_local_bitfield(status_flags_assoc, flags); + return fcntl_flags; +} + +/* * rtems_libio_allocate * * This routine searches the IOP Table for an unused entry. If it |