diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-02-24 17:08:06 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-13 12:24:16 +0100 |
commit | 699ac7c08f8e0f7f1a37144e9c316c0dd7a16175 (patch) | |
tree | f07bb6097b312586f45c0803c8d4a8464f8068a1 /cpukit/libfs/src/imfs/imfs_eval.c | |
parent | IMFS: New support functions (diff) | |
download | rtems-699ac7c08f8e0f7f1a37144e9c316c0dd7a16175.tar.bz2 |
IMFS: Add and use node control
Add and use structure IMFS_node_control with support functions. This
helps to make high level functions independent of the node type and
reduces the number of branches in the code.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_eval.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_eval.c b/cpukit/libfs/src/imfs/imfs_eval.c index a65569a470..4fcfd67ee9 100644 --- a/cpukit/libfs/src/imfs/imfs_eval.c +++ b/cpukit/libfs/src/imfs/imfs_eval.c @@ -18,38 +18,6 @@ #include "imfs.h" -void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) -{ - IMFS_jnode_t *node = loc->node_access; - IMFS_fs_info_t *fs_info = loc->mt_entry->fs_info; - const rtems_filesystem_file_handlers_r *handlers; - - switch ( node->type ) { - case IMFS_DIRECTORY: - handlers = &IMFS_directory_handlers; - break; - case IMFS_DEVICE: - handlers = &IMFS_device_handlers; - break; - case IMFS_HARD_LINK: - case IMFS_SYM_LINK: - handlers = fs_info->link_handlers; - break; - case IMFS_MEMORY_FILE: - case IMFS_LINEAR_FILE: - handlers = &IMFS_memfile_handlers; - break; - case IMFS_FIFO: - handlers = fs_info->fifo_handlers; - break; - default: - IMFS_assert( 0 ); - break; - } - - loc->handlers = handlers; -} - static bool IMFS_eval_is_directory( rtems_filesystem_eval_path_context_t *ctx, void *arg |