summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2010-06-02 00:43:13 +0000
committerChris Johns <chrisj@rtems.org>2010-06-02 00:43:13 +0000
commitdfce6724fed632447e1c2a1fd837b7f18897bd23 (patch)
tree17c528c36e9692dc6729ed0dd2587112a7115067 /cpukit
parent2010-06-01 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-dfce6724fed632447e1c2a1fd837b7f18897bd23.tar.bz2
2010-06-01 Chris Johns <chrisj@rtems.org>
* libcsupport/include/rtems/libio.h: Make the struct name the same as the typedef. * sapi/include/confdefs.h: Fixes for use in C++.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h4
-rw-r--r--cpukit/sapi/include/confdefs.h31
3 files changed, 28 insertions, 13 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 968487c754..23e0cc9f48 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-01 Chris Johns <chrisj@rtems.org>
+
+ * libcsupport/include/rtems/libio.h: Make the struct name the same
+ as the typedef.
+ * sapi/include/confdefs.h: Fixes for use in C++.
+
2010-06-01 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/shell/print-ls.c: Remove (long) cast of st_ino.
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index d6cc6e9cbd..dadc446ead 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -292,7 +292,7 @@ struct _rtems_filesystem_operations_table {
/*
* File system table used by mount to manage file systems.
*/
-typedef struct _rtems_filesystem_table {
+typedef struct rtems_filesystem_table_t {
const char *type;
rtems_filesystem_fsmount_me_t mount_h;
} rtems_filesystem_table_t;
@@ -300,7 +300,7 @@ typedef struct _rtems_filesystem_table {
/*
* File system table runtime loaded nodes.
*/
-typedef struct _rtems_filesystem_table_node {
+typedef struct rtems_filesystem_table_node_t {
rtems_chain_node node;
rtems_filesystem_table_t entry;
} rtems_filesystem_table_node_t;
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index a65ec590f7..aa6ec8932e 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -72,7 +72,6 @@ extern rtems_configuration_table Configuration;
#define CONFIGURE_NEWLIB_EXTENSION 0
#endif
-
#include <rtems/libio.h>
#ifdef CONFIGURE_INIT
@@ -230,12 +229,16 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
/*
* If disabling the file system undef everything. If DEVFS as the base
* filesystem undefine all other filesystems because you cannot mount other
- * filesystems.
+ * filesystems. Same for miniIMFS.
*/
#if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) || \
- defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
+ defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) || \
+ defined(CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM)
#if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM)
#undef CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
+ #undef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
+ #elif defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
+ #undef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
#endif
#undef CONFIGURE_FILESYSTEM_miniIMFS
#undef CONFIGURE_FILESYSTEM_IMFS
@@ -251,9 +254,10 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
* If the base filesystem is DEVFS define it else define IMFS.
* We will have either DEVFS or IMFS defined after this.
*/
- #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) && \
- !defined(CONFIGURE_FILESYSTEM_DEVFS)
+ #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM)
#define CONFIGURE_FILESYSTEM_DEVFS
+ #elif defined(CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM)
+ #define CONFIGURE_FILESYSTEM_miniIMFS
#elif !defined(CONFIGURE_FILESYSTEM_IMFS)
#define CONFIGURE_FILESYSTEM_IMFS
#endif
@@ -276,10 +280,6 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
#endif
-#ifdef CONFIGURE_INIT
- int imfs_rq_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK;
-#endif /* CONFIGURE_INIT */
-
/**
* This defines the miniIMFS file system table entry.
*/
@@ -357,7 +357,8 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
/*
* DEVFS variables.
*/
- #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) && !defined(RTEMS_COVERAGE)
+ #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) && \
+ !defined(RTEMS_COVERAGE)
#define CONFIGURE_MEMORY_FOR_DEVFS 0
#elif defined(CONFIGURE_FILESYSTEM_DEVFS)
#ifndef CONFIGURE_MAXIMUM_DEVICES
@@ -375,6 +376,11 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
#define CONFIGURE_MEMORY_FOR_DEVFS 0
#endif
+ #if defined(CONFIGURE_FILESYSTEM_IMFS) || \
+ defined(CONFIGURE_FILESYSTEM_miniIMFS)
+ int imfs_rq_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK;
+ #endif
+
/**
* Table termination record.
*/
@@ -383,7 +389,10 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
/**
* The default file system table. Must be terminated with the NULL entry if
* you provide your own.
+ *
+ * The extern is needed to stop the table being removed by the optimizer.
*/
+ extern const rtems_filesystem_table_t configuration_filesystem_table[];
#ifndef CONFIGURE_HAS_OWN_FILESYSTEM_TABLE
const rtems_filesystem_table_t configuration_filesystem_table[] = {
#if defined(CONFIGURE_FILESYSTEM_miniIMFS) && \
@@ -428,7 +437,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
* NOTE: When building for coverage, we need this variable all the time.
*/
#if !defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) || \
- defined(RTEMS_COVERAGE)
+ defined(RTEMS_COVERAGE)
#if defined(CONFIGURE_PIPES_ENABLED)
bool rtems_pipe_configured = true;
#else