[PATCH] config: Add CONFIGURE_IMFS_ENABLE_MKFIFO

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Dec 12 06:03:36 UTC 2019


Obsolete undocumented configuration options CONFIGURE_MAXIMUM_FIFOS and
CONFIGURE_MAXIMUM_PIPES.  Replace these options with the new
CONFIGURE_IMFS_ENABLE_MKFIFO configuration option.

Update #3840.
---
 cpukit/include/rtems/confdefs.h      | 16 +++++++++++-----
 testsuites/psxtests/psximfs02/init.c |  3 +--
 testsuites/psxtests/psxpipe01/init.c |  2 +-
 testsuites/sptests/spfifo02/init.c   |  3 ++-
 testsuites/sptests/spfifo03/init.c   |  2 +-
 testsuites/sptests/spfifo04/init.c   |  3 ++-
 testsuites/sptests/spfifo05/init.c   |  2 +-
 7 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index 922e4d7a9d..92aae16c9b 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -202,15 +202,21 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
 /**
  * This is specified to configure the maximum number of POSIX FIFOs.
  */
-#if !defined(CONFIGURE_MAXIMUM_FIFOS)
-  #define CONFIGURE_MAXIMUM_FIFOS 0
+#ifdef CONFIGURE_MAXIMUM_FIFOS
+  #warning "CONFIGURE_MAXIMUM_FIFOS is obsolete since RTEMS 5.1; use CONFIGURE_IMFS_ENABLE_MKFIFO instead"
+  #if CONFIGURE_MAXIMUM_FIFOS > 0
+    #define CONFIGURE_IMFS_ENABLE_MKFIFO
+  #endif
 #endif
 
 /**
  * This is specified to configure the maximum number of POSIX named pipes.
  */
-#if !defined(CONFIGURE_MAXIMUM_PIPES)
-  #define CONFIGURE_MAXIMUM_PIPES 0
+#ifdef CONFIGURE_MAXIMUM_PIPES
+  #warning "CONFIGURE_MAXIMUM_PIPES is obsolete since RTEMS 5.1; use CONFIGURE_IMFS_ENABLE_MKFIFO instead"
+  #if CONFIGURE_MAXIMUM_PIPES > 0
+    #define CONFIGURE_IMFS_ENABLE_MKFIFO
+  #endif
 #endif
 
 /*
@@ -586,7 +592,7 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
         #else
           &IMFS_mknod_control_memfile,
         #endif
-        #if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0
+        #ifdef CONFIGURE_IMFS_ENABLE_MKFIFO
           &IMFS_mknod_control_fifo
         #else
           &IMFS_mknod_control_enosys
diff --git a/testsuites/psxtests/psximfs02/init.c b/testsuites/psxtests/psximfs02/init.c
index e5f51ce794..cfa6aa27d8 100644
--- a/testsuites/psxtests/psximfs02/init.c
+++ b/testsuites/psxtests/psximfs02/init.c
@@ -203,6 +203,7 @@ rtems_task Init(
 
 #define CONFIGURE_MAXIMUM_TASKS                  1
 #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK   16
+#define CONFIGURE_IMFS_ENABLE_MKFIFO
 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
 #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
 
@@ -211,7 +212,5 @@ rtems_task Init(
 
 #define CONFIGURE_INIT
 
-#define CONFIGURE_MAXIMUM_FIFOS 1
-
 #include <rtems/confdefs.h>
 /* end of file */
diff --git a/testsuites/psxtests/psxpipe01/init.c b/testsuites/psxtests/psxpipe01/init.c
index 6ed4ee2390..f7e862fac5 100644
--- a/testsuites/psxtests/psxpipe01/init.c
+++ b/testsuites/psxtests/psxpipe01/init.c
@@ -111,7 +111,7 @@ rtems_task Init(
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
-#define CONFIGURE_MAXIMUM_PIPES 2
+#define CONFIGURE_IMFS_ENABLE_MKFIFO
 
 #define CONFIGURE_INIT
 #include <rtems/confdefs.h>
diff --git a/testsuites/sptests/spfifo02/init.c b/testsuites/sptests/spfifo02/init.c
index 4fca304d92..abc79575a6 100644
--- a/testsuites/sptests/spfifo02/init.c
+++ b/testsuites/sptests/spfifo02/init.c
@@ -164,7 +164,8 @@ rtems_task Init(
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
-#define CONFIGURE_MAXIMUM_FIFOS 1
+
+#define CONFIGURE_IMFS_ENABLE_MKFIFO
 
 #define CONFIGURE_INIT
 
diff --git a/testsuites/sptests/spfifo03/init.c b/testsuites/sptests/spfifo03/init.c
index 2760c60613..94de05af39 100644
--- a/testsuites/sptests/spfifo03/init.c
+++ b/testsuites/sptests/spfifo03/init.c
@@ -215,7 +215,7 @@ rtems_task Init(
 
 #define CONFIGURE_MAXIMUM_BARRIERS 1
 
-#define CONFIGURE_MAXIMUM_FIFOS 1
+#define CONFIGURE_IMFS_ENABLE_MKFIFO
 
 #define CONFIGURE_DISABLE_SMP_CONFIGURATION
 
diff --git a/testsuites/sptests/spfifo04/init.c b/testsuites/sptests/spfifo04/init.c
index 01c84e4df6..db71226046 100644
--- a/testsuites/sptests/spfifo04/init.c
+++ b/testsuites/sptests/spfifo04/init.c
@@ -103,7 +103,8 @@ rtems_task Init(
 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
 
 #define CONFIGURE_MAXIMUM_TASKS 3
-#define CONFIGURE_MAXIMUM_FIFOS 1
+
+#define CONFIGURE_IMFS_ENABLE_MKFIFO
 
 #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
 
diff --git a/testsuites/sptests/spfifo05/init.c b/testsuites/sptests/spfifo05/init.c
index d482ece530..e9cff9c52e 100644
--- a/testsuites/sptests/spfifo05/init.c
+++ b/testsuites/sptests/spfifo05/init.c
@@ -271,7 +271,7 @@ rtems_task Init(
 
 #define CONFIGURE_MAXIMUM_BARRIERS 2
 
-#define CONFIGURE_MAXIMUM_FIFOS 1
+#define CONFIGURE_IMFS_ENABLE_MKFIFO
 
 #define CONFIGURE_DISABLE_SMP_CONFIGURATION
 
-- 
2.16.4



More information about the devel mailing list