summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2003-07-24 19:54:55 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2003-07-24 19:54:55 +0000
commit1e4d4f85d84a0553985dd6121bac2d7878ae3abf (patch)
tree7142061faea8474777a5349bee230e12d2c6698d /cpukit
parent129b4a792b980632ebfc24641538d533bf853e27 (diff)
downloadrtems-1e4d4f85d84a0553985dd6121bac2d7878ae3abf.tar.bz2
2003-07-24 jennifer averett <jennifer.averett@OARcorp.com>
PR 434/filesystem * src/imfs/imfs_init.c: Modified to return error code * src/imfs/miniimfs_init.c: Modified to return error code * src/imfs/imfs_initsup.c: Modified to set error upon memory failure.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libfs/src/imfs/imfs_init.c3
-rw-r--r--cpukit/libfs/src/imfs/imfs_initsupp.c3
-rw-r--r--cpukit/libfs/src/imfs/miniimfs_init.c3
3 files changed, 4 insertions, 5 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_init.c b/cpukit/libfs/src/imfs/imfs_init.c
index 01f02ae406..59c5a5671f 100644
--- a/cpukit/libfs/src/imfs/imfs_init.c
+++ b/cpukit/libfs/src/imfs/imfs_init.c
@@ -60,12 +60,11 @@ int IMFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
- IMFS_initialize_support(
+ return IMFS_initialize_support(
temp_mt_entry,
&IMFS_ops,
&IMFS_linearfile_handlers,
&IMFS_memfile_handlers,
&IMFS_directory_handlers
);
- return 0;
}
diff --git a/cpukit/libfs/src/imfs/imfs_initsupp.c b/cpukit/libfs/src/imfs/imfs_initsupp.c
index bf0cb8ccdc..af7f8d23af 100644
--- a/cpukit/libfs/src/imfs/imfs_initsupp.c
+++ b/cpukit/libfs/src/imfs/imfs_initsupp.c
@@ -24,6 +24,7 @@
#include "imfs.h"
#include <rtems/libio_.h>
+#include <rtems/seterr.h>
#if defined(IMFS_DEBUG)
#include <stdio.h>
@@ -68,7 +69,7 @@ int IMFS_initialize_support(
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ){
free(temp_mt_entry->mt_fs_root.node_access);
- return 1;
+ rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
diff --git a/cpukit/libfs/src/imfs/miniimfs_init.c b/cpukit/libfs/src/imfs/miniimfs_init.c
index 8ead84524e..2f45a5eec9 100644
--- a/cpukit/libfs/src/imfs/miniimfs_init.c
+++ b/cpukit/libfs/src/imfs/miniimfs_init.c
@@ -60,14 +60,13 @@ int miniIMFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
- IMFS_initialize_support(
+ return IMFS_initialize_support(
temp_mt_entry,
&miniIMFS_ops,
&rtems_filesystem_null_handlers, /* for linearfiles */
&rtems_filesystem_null_handlers, /* for memfiles */
&rtems_filesystem_null_handlers /* for directories */
);
- return 0;
}