diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-03-06 18:09:15 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-03-06 18:09:15 +0000 |
commit | 3ef87981ebac62a3df5af981e8f62f151d973074 (patch) | |
tree | 9216b95a01e1df2725be70a70b339fba1c6eb4a8 /c/src/exec/libcsupport/src/libio.c | |
parent | Wrong constant name was used for the DEBUG exception. (diff) | |
download | rtems-3ef87981ebac62a3df5af981e8f62f151d973074.tar.bz2 |
Added F_GETFL support so the fdopen() implementation in newlib 1.8.1
would work. At the same time, the initial implementation of F_SETFL
was added. A support routine was added to convert internal libio
flags back to the POSIX style. Eventually the internal representation
should be eliminated in the interest of simplicity and code reduction.
This problem was reported by Jake Janovetz <janovetz@tempest.ece.uiuc.edu>.
Diffstat (limited to '')
-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 |