summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/open.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-13 14:00:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-15 10:27:08 +0200
commitca90c6c1db3881ce5a44e06610a29a128e5455f2 (patch)
treef54ed2c4c10d7d73be307647553ca2f7971f6573 /cpukit/libcsupport/src/open.c
parentlibio: Add iop set/clear flags (diff)
downloadrtems-ca90c6c1db3881ce5a44e06610a29a128e5455f2.tar.bz2
libio: Add rtems_libio_iop_flags_initialize()
Update #3132.
Diffstat (limited to 'cpukit/libcsupport/src/open.c')
-rw-r--r--cpukit/libcsupport/src/open.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/open.c b/cpukit/libcsupport/src/open.c
index 2ee99f1f4c..22773454ba 100644
--- a/cpukit/libcsupport/src/open.c
+++ b/cpukit/libcsupport/src/open.c
@@ -96,13 +96,16 @@ static int do_open(
}
}
- rtems_libio_iop_flags_set( iop, rtems_libio_fcntl_flags( oflag ) );
rtems_filesystem_eval_path_extract_currentloc( &ctx, &iop->pathinfo );
rtems_filesystem_eval_path_cleanup( &ctx );
+ iop->flags = rtems_libio_fcntl_flags( oflag );
+
rv = (*iop->pathinfo.handlers->open_h)( iop, path, oflag, mode );
if ( rv == 0 ) {
+ rtems_libio_iop_flags_set( iop, LIBIO_FLAGS_OPEN );
+
if ( truncate ) {
rv = ftruncate( fd, 0 );
if ( rv != 0 ) {