summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-02-03 22:05:20 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-02-03 22:05:20 +0000
commit43f69a2d7b44168a9c17a1ae3767cdd1a7e243cc (patch)
tree7eb35b23f4c52edd17125f0f94c3bbb6ecb82c28 /cpukit/libfs
parent2003-02-03 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-43f69a2d7b44168a9c17a1ae3767cdd1a7e243cc.tar.bz2
2003-02-03 Steven Johnson <sjohnson@neurizon.net>
PR 338/filesystem * src/imfs/ioman.c: Fix reentrancy problem with rtems_io_lookup_name() (API change).
Diffstat (limited to 'cpukit/libfs')
-rw-r--r--cpukit/libfs/ChangeLog6
-rw-r--r--cpukit/libfs/src/imfs/ioman.c15
2 files changed, 12 insertions, 9 deletions
diff --git a/cpukit/libfs/ChangeLog b/cpukit/libfs/ChangeLog
index 0cc28e0099..da7e012016 100644
--- a/cpukit/libfs/ChangeLog
+++ b/cpukit/libfs/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-03 Steven Johnson <sjohnson@neurizon.net>
+
+ PR 338/filesystem
+ * src/imfs/ioman.c: Fix reentrancy problem with
+ rtems_io_lookup_name() (API change).
+
2003-01-03 Eugeny S. Mints <Eugeny.Mints@oktet.ru>
* src/dosfs/msdos_initsupp.c: Specify inherited priority as 0 since this
diff --git a/cpukit/libfs/src/imfs/ioman.c b/cpukit/libfs/src/imfs/ioman.c
index ffddc89928..d3daedfecf 100644
--- a/cpukit/libfs/src/imfs/ioman.c
+++ b/cpukit/libfs/src/imfs/ioman.c
@@ -63,7 +63,7 @@ rtems_status_code rtems_io_register_name(
/*
* rtems_io_lookup_name
*
- * This version is not reentrant.
+ * This version is reentrant.
*
* XXX - This is dependent upon IMFS and should not be.
* Suggest adding a filesystem routine to fill in the device_info.
@@ -71,13 +71,12 @@ rtems_status_code rtems_io_register_name(
rtems_status_code rtems_io_lookup_name(
const char *name,
- rtems_driver_name_t **device_info
+ rtems_driver_name_t *device_info
)
{
#if !defined(RTEMS_UNIX)
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
- static rtems_driver_name_t device;
int result;
rtems_filesystem_node_types_t node_type;
@@ -92,16 +91,14 @@ rtems_status_code rtems_io_lookup_name(
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
- *device_info = 0;
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
- device.device_name = (char *) name;
- device.device_name_length = strlen( name );
- device.major = the_jnode->info.device.major;
- device.minor = the_jnode->info.device.minor;
- *device_info = &device;
+ device_info->device_name = (char *) name;
+ device_info->device_name_length = strlen( name );
+ device_info->major = the_jnode->info.device.major;
+ device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );