source: rtems/cpukit/libfs/src/imfs/miniimfs_init.c @ 29e92b0

4.104.115
Last change on this file since 29e92b0 was 29e92b0, checked in by Chris Johns <chrisj@…>, on 05/31/10 at 13:56:37

2010-05-31 Chris Johns <chrisj@…>

  • libcsupport/Makefile.am: Add mount-mgr.c.
  • libcsupport/src/mount-mgr.c: New.
  • include/rtems/fs.h: Added rtems_filesystem_location_mount.
  • libcsupport/include/rtems/libio.h, libcsupport/src/mount.c: New mount interface. It is similar to Linux.
  • libcsupport/include/rtems/libio_.h: Remove the init_fs_mount_table call.
  • libcsupport/src/base_fs.c: Remove init_fs_mount_table_call. Use the new mount call. Remove setting the root node in the global pathloc. Mount does this now.
  • libcsupport/src/privateenv.c: Remove the hack to set the root mount table entry in the environment.
  • libcsupport/src/unmount.cL Free the target string.
  • libblock/src/bdpart-mount.c: New mount API.
  • libfs/src/devfs/devfs.h, libfs/src/devfs/devfs_init.c, libfs/src/dosfs/dosfs.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_init.c, libfs/src/imfs/miniimfs_init.c, libfs/src/nfsclient/src/librtemsNfs.h, libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs.h, libnetworking/lib/ftpfs.c, libnetworking/rtems/ftpfs.h, libnetworking/rtems/tftp.h: New mount_h API.
  • libfs/src/devfs/devfs_eval.c: Local include of extern ops.
  • libfs/src/nfsclient/src/nfs.c: New mount API. Removed the mount me call and fixed the initialisation to happen when mounting.
  • libmisc/Makefile.am, libmisc/shell/shellconfig.h: Remove mount filesystem files.
  • libmisc/fsmount/fsmount.c, libmisc/fsmount/fsmount.h: Updated to the new mount table values.
  • libmisc/shell/main_mount_ftp.c, libmisc/shell/main_mount_msdos.c, libmisc/shell/main_mount_rfs.c, libmisc/shell/main_mount_tftp.c: Removed.
  • libmisc/shell/main_mount.c: Use the new mount API. Also access the file system table for the file system types.
  • libnetworking/lib/tftpDriver.c: Updated to the new mount API. Fixed to allow mounting from any mount point. Also can now have more than file system mounted.
  • sapi/include/confdefs.h: Add file system configuration support.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  Mini-IMFS Initialization
3 *
4 *  COPYRIGHT (c) 1989-1999.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#if HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#include <sys/types.h>         /* for mkdir */
19#include <fcntl.h>
20#include <unistd.h>
21#include <stdlib.h>
22
23#include <assert.h>
24
25#include "imfs.h"
26#include <rtems/libio_.h>
27
28#if defined(IMFS_DEBUG)
29#include <stdio.h>
30#endif
31
32/*
33 *  miniIMFS file system operations table
34 */
35
36const rtems_filesystem_operations_table  miniIMFS_ops = {
37  IMFS_eval_path,
38  IMFS_evaluate_for_make,
39  NULL, /* XXX IMFS_link, */
40  NULL, /* XXX IMFS_unlink, */
41  IMFS_node_type,
42  IMFS_mknod,
43  NULL, /* XXX IMFS_chown, */
44  NULL, /* XXX IMFS_freenodinfo, */
45  NULL, /* XXX IMFS_mount, */
46  miniIMFS_initialize,
47  NULL, /* XXX IMFS_unmount, */
48  NULL, /* XXX IMFS_fsunmount, */
49  NULL, /* XXX IMFS_utime, */
50  NULL, /* XXX IMFS_evaluate_link, */
51  NULL, /* XXX IMFS_symlink, */
52  NULL, /* XXX IMFS_readlink */
53  NULL, /* XXX IMFS_rename */
54  NULL  /* XXX IMFS_statvfs */
55};
56
57/*
58 *  miniIMFS_initialize
59 */
60
61int miniIMFS_initialize(
62  rtems_filesystem_mount_table_entry_t *temp_mt_entry,
63  const void                           *data
64)
65{
66    return IMFS_initialize_support(
67      temp_mt_entry,
68      &miniIMFS_ops,
69      &rtems_filesystem_null_handlers,  /* for memfiles */
70      &rtems_filesystem_null_handlers   /* for directories */
71   );
72}
Note: See TracBrowser for help on using the repository browser.