summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc/libio.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libc/libio.c')
-rw-r--r--c/src/lib/libc/libio.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/c/src/lib/libc/libio.c b/c/src/lib/libc/libio.c
index 59b7086a03..bedd4a920e 100644
--- a/c/src/lib/libc/libio.c
+++ b/c/src/lib/libc/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