summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs/memfile.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-02-24 17:08:06 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-03-13 12:24:16 +0100
commit699ac7c08f8e0f7f1a37144e9c316c0dd7a16175 (patch)
treef07bb6097b312586f45c0803c8d4a8464f8068a1 /cpukit/libfs/src/imfs/memfile.c
parentIMFS: New support functions (diff)
downloadrtems-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 'cpukit/libfs/src/imfs/memfile.c')
-rw-r--r--cpukit/libfs/src/imfs/memfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c
index aa3f8a71b4..d2cff01517 100644
--- a/cpukit/libfs/src/imfs/memfile.c
+++ b/cpukit/libfs/src/imfs/memfile.c
@@ -97,7 +97,7 @@ int memfile_open(
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
- the_jnode->type = IMFS_MEMORY_FILE;
+ the_jnode->control = &IMFS_node_control_memfile;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
@@ -420,7 +420,7 @@ static void memfile_free_blocks_in_table(
* Regardless until the IMFS implementation is proven, it
* is better to stick to simple, easy to understand algorithms.
*/
-int IMFS_memfile_remove(
+IMFS_jnode_t *IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
@@ -482,7 +482,7 @@ int IMFS_memfile_remove(
(block_p **)&info->triply_indirect, to_free );
}
- return 0;
+ return the_jnode;
}
/*