summaryrefslogtreecommitdiff
path: root/cpukit/libfs/src/imfs/imfs_creat.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-12-31 10:56:05 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-27 06:54:22 +0100
commitcf36b70e8dd8755e7dac6eb516169f586e78566d (patch)
tree97200818ec5dfeaa4e137a572fcbb4db746842b1 /cpukit/libfs/src/imfs/imfs_creat.c
parent369328f00ff65a7657135351589a4676d106abbb (diff)
IMFS: Replace node union with individual struct
This reduces the average node size. Add and use IMFS_GENERIC_INITIALIZER().
Diffstat (limited to 'cpukit/libfs/src/imfs/imfs_creat.c')
-rw-r--r--cpukit/libfs/src/imfs/imfs_creat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_creat.c b/cpukit/libfs/src/imfs/imfs_creat.c
index 4cea0c2f98..effb84b40a 100644
--- a/cpukit/libfs/src/imfs/imfs_creat.c
+++ b/cpukit/libfs/src/imfs/imfs_creat.c
@@ -28,7 +28,7 @@ IMFS_jnode_t *IMFS_allocate_node(
const char *name,
size_t namelen,
mode_t mode,
- const IMFS_types_union *info
+ void *arg
)
{
IMFS_jnode_t *node;
@@ -46,7 +46,7 @@ IMFS_jnode_t *IMFS_allocate_node(
/*
* Allocate an IMFS jnode
*/
- node = calloc( 1, sizeof( IMFS_jnode_t ) );
+ node = calloc( 1, node_control->node_size );
if ( !node ) {
errno = ENOMEM;
@@ -78,7 +78,7 @@ IMFS_jnode_t *IMFS_allocate_node(
node->stat_ctime = (time_t) tv.tv_sec;
node->st_ino = ++fs_info->ino_count;
- initialized_node = (*node->control->node_initialize)( node, info );
+ initialized_node = (*node->control->node_initialize)( node, arg );
if ( initialized_node == NULL ) {
free( node );
}
@@ -92,7 +92,7 @@ IMFS_jnode_t *IMFS_create_node_with_control(
const char *name,
size_t namelen,
mode_t mode,
- const IMFS_types_union *info
+ void *arg
)
{
IMFS_fs_info_t *fs_info = parentloc->mt_entry->fs_info;
@@ -102,7 +102,7 @@ IMFS_jnode_t *IMFS_create_node_with_control(
name,
namelen,
mode,
- info
+ arg
);
if ( node != NULL ) {