diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-26 20:17:13 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-26 20:17:13 +0000 |
commit | 657e1bf66b9406cd4c18af1265443e9ebf006f39 (patch) | |
tree | c56bea6d27d9a6a19ac1f139839545db8b63347c /c/src/exec/libfs/src/imfs/miniimfs_init.c | |
parent | Patch from Gerwin Pfab <pb@schenk.isar.de> to leave dispatching (diff) | |
download | rtems-657e1bf66b9406cd4c18af1265443e9ebf006f39.tar.bz2 |
Added initial cut at miniIMFS which leaves out memfile and directory
readdir support. The next step is to add a mount table and configure
either the miniIMFS or the full IMFS at the application level.
Diffstat (limited to 'c/src/exec/libfs/src/imfs/miniimfs_init.c')
-rw-r--r-- | c/src/exec/libfs/src/imfs/miniimfs_init.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/c/src/exec/libfs/src/imfs/miniimfs_init.c b/c/src/exec/libfs/src/imfs/miniimfs_init.c new file mode 100644 index 0000000000..983cde9439 --- /dev/null +++ b/c/src/exec/libfs/src/imfs/miniimfs_init.c @@ -0,0 +1,71 @@ +/* + * Mini-IMFS Initialization + * + * COPYRIGHT (c) 1989-1998. + * On-Line Applications Research Corporation (OAR). + * Copyright assigned to U.S. Government, 1994. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + +#include <sys/types.h> /* for mkdir */ +#include <fcntl.h> +#include <unistd.h> +#include <stdlib.h> + +#include <assert.h> + +#include "imfs.h" +#include "libio_.h" + +#if defined(IMFS_DEBUG) +#include <stdio.h> +#endif + +/* + * miniIMFS file system operations table + */ + +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_rmnod, */ + 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 */ +}; + +/* + * miniIMFS_initialize + */ + +int miniIMFS_initialize( + rtems_filesystem_mount_table_entry_t *temp_mt_entry +) +{ + IMFS_initialize_support( + temp_mt_entry, + &miniIMFS_ops, + &rtems_filesystem_null_handlers, /* for memfiles */ + &rtems_filesystem_null_handlers /* for directories */ + ); + return 0; +} + + + |