diff options
Diffstat (limited to 'cpukit/libfs/src/imfs/miniimfs_init.c')
-rw-r--r-- | cpukit/libfs/src/imfs/miniimfs_init.c | 83 |
1 files changed, 36 insertions, 47 deletions
diff --git a/cpukit/libfs/src/imfs/miniimfs_init.c b/cpukit/libfs/src/imfs/miniimfs_init.c index 6bad5e29a2..c13a071fa5 100644 --- a/cpukit/libfs/src/imfs/miniimfs_init.c +++ b/cpukit/libfs/src/imfs/miniimfs_init.c @@ -1,6 +1,12 @@ -/* - * Mini-IMFS Initialization +/** + * @file + * + * @ingroup LibFSIMFS * + * @brief Mini-IMFS initialization. + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -15,58 +21,41 @@ #include "config.h" #endif -#include <sys/types.h> /* for mkdir */ -#include <fcntl.h> -#include <unistd.h> -#include <stdlib.h> - -#include <assert.h> - -#include "imfs.h" #include <rtems/libio_.h> -#if defined(IMFS_DEBUG) -#include <stdio.h> -#endif - -/* - * miniIMFS file system operations table - */ +#include "imfs.h" -const rtems_filesystem_operations_table miniIMFS_ops = { - IMFS_eval_path, - IMFS_evaluate_for_make, - NULL, /* XXX IMFS_link, */ - NULL, /* XXX IMFS_unlink, */ - IMFS_node_type, - IMFS_mknod, - NULL, /* XXX IMFS_chown, */ - NULL, /* XXX IMFS_freenodinfo, */ - NULL, /* XXX IMFS_mount, */ - miniIMFS_initialize, - NULL, /* XXX IMFS_unmount, */ - NULL, /* XXX IMFS_fsunmount, */ - NULL, /* XXX IMFS_utime, */ - NULL, /* XXX IMFS_evaluate_link, */ - NULL, /* XXX IMFS_symlink, */ - NULL, /* XXX IMFS_readlink */ - NULL, /* XXX IMFS_rename */ - NULL /* XXX IMFS_statvfs */ +static const rtems_filesystem_operations_table miniIMFS_ops = { + .evalpath_h = IMFS_eval_path, + .evalformake_h = IMFS_evaluate_for_make, + .link_h = NULL, + .unlink_h = NULL, + .node_type_h = IMFS_node_type, + .mknod_h = IMFS_mknod, + .chown_h = NULL, + .freenod_h = NULL, + .mount_h = IMFS_mount, + .fsmount_me_h = miniIMFS_initialize, + .unmount_h = NULL, + .fsunmount_me_h = NULL, + .utime_h = NULL, + .eval_link_h = NULL, + .symlink_h = NULL, + .readlink_h = NULL, + .rename_h = NULL, + .statvfs_h = NULL }; -/* - * miniIMFS_initialize - */ - int miniIMFS_initialize( - rtems_filesystem_mount_table_entry_t *temp_mt_entry, + rtems_filesystem_mount_table_entry_t *mt_entry, const void *data ) { - return IMFS_initialize_support( - temp_mt_entry, - &miniIMFS_ops, - &rtems_filesystem_null_handlers, /* for memfiles */ - &rtems_filesystem_null_handlers /* for directories */ - ); + return IMFS_initialize_support( + mt_entry, + &miniIMFS_ops, + &rtems_filesystem_null_handlers, /* for memfiles */ + &rtems_filesystem_null_handlers, /* for directories */ + &rtems_filesystem_null_handlers /* for fifos */ + ); } |