[rtems commit] libio: Remove LIBIO_FLAGS_CREATE

Sebastian Huber sebh at rtems.org
Fri Sep 15 08:58:26 UTC 2017


Module:    rtems
Branch:    master
Commit:    5eb67f3ad04ee1cbacc38b474397a620d3064e1c
Changeset: http://git.rtems.org/rtems/commit/?id=5eb67f3ad04ee1cbacc38b474397a620d3064e1c

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Sep 13 10:49:19 2017 +0200

libio: Remove LIBIO_FLAGS_CREATE

Close #3134.

---

 cpukit/libcsupport/include/rtems/libio.h | 1 -
 cpukit/libcsupport/src/fcntl.c           | 2 --
 cpukit/libcsupport/src/libio.c           | 5 -----
 3 files changed, 8 deletions(-)

diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 7022de6..99d1565 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -1369,7 +1369,6 @@ typedef struct {
 #define LIBIO_FLAGS_WRITE         0x0004U  /* writing */
 #define LIBIO_FLAGS_OPEN          0x0100U  /* device is open */
 #define LIBIO_FLAGS_APPEND        0x0200U  /* all writes append */
-#define LIBIO_FLAGS_CREATE        0x0400U  /* create file */
 #define LIBIO_FLAGS_CLOSE_ON_EXEC 0x0800U  /* close on process exec() */
 #define LIBIO_FLAGS_READ_WRITE    (LIBIO_FLAGS_READ | LIBIO_FLAGS_WRITE)
 
diff --git a/cpukit/libcsupport/src/fcntl.c b/cpukit/libcsupport/src/fcntl.c
index e7b6b23..e7a9868 100644
--- a/cpukit/libcsupport/src/fcntl.c
+++ b/cpukit/libcsupport/src/fcntl.c
@@ -33,7 +33,6 @@ static int duplicate_iop( rtems_libio_t *iop )
   if (diop != NULL) {
     int oflag = rtems_libio_to_fcntl_flags( iop->flags );
 
-    oflag &= ~O_CREAT;
     diop->flags |= rtems_libio_fcntl_flags( oflag );
 
     rtems_filesystem_instance_lock( &iop->pathinfo );
@@ -76,7 +75,6 @@ static int duplicate2_iop( rtems_libio_t *iop, int fd2 )
 
     if (rv == 0) {
       oflag = rtems_libio_to_fcntl_flags( iop->flags );
-      oflag &= ~O_CREAT;
       iop2->flags |= rtems_libio_fcntl_flags( oflag );
 
       rtems_filesystem_instance_lock( &iop->pathinfo );
diff --git a/cpukit/libcsupport/src/libio.c b/cpukit/libcsupport/src/libio.c
index 22be641..cd3a442 100644
--- a/cpukit/libcsupport/src/libio.c
+++ b/cpukit/libcsupport/src/libio.c
@@ -55,7 +55,6 @@ static const rtems_assoc_t status_flags_assoc[] = {
 #endif
   { "NONBLOCK",  LIBIO_FLAGS_NO_DELAY,  O_NONBLOCK },
   { "APPEND",    LIBIO_FLAGS_APPEND,    O_APPEND },
-  { "CREATE",    LIBIO_FLAGS_CREATE,    O_CREAT },
   { 0, 0, 0 },
 };
 
@@ -104,10 +103,6 @@ int rtems_libio_to_fcntl_flags( uint32_t flags )
     fcntl_flags |= O_APPEND;
   }
 
-  if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
-    fcntl_flags |= O_CREAT;
-  }
-
   return fcntl_flags;
 }
 




More information about the vc mailing list