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

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup LibFSIMFS
5 *
6 * @brief Mini-IMFS initialization.
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-1999.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.org/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19  #include "config.h"
20#endif
21
22#include "imfs.h"
23
24const rtems_filesystem_operations_table miniIMFS_ops = {
25  .lock_h = rtems_filesystem_default_lock,
26  .unlock_h = rtems_filesystem_default_unlock,
27  .eval_path_h = IMFS_eval_path,
28  .link_h = rtems_filesystem_default_link,
29  .are_nodes_equal_h = rtems_filesystem_default_are_nodes_equal,
30  .node_type_h = IMFS_node_type,
31  .mknod_h = IMFS_mknod,
32  .rmnod_h = IMFS_rmnod,
33  .fchmod_h = rtems_filesystem_default_fchmod,
34  .chown_h = rtems_filesystem_default_chown,
35  .clonenod_h = IMFS_node_clone,
36  .freenod_h = IMFS_node_free,
37  .mount_h = IMFS_mount,
38  .fsmount_me_h = miniIMFS_initialize,
39  .unmount_h = rtems_filesystem_default_unmount,
40  .fsunmount_me_h = rtems_filesystem_default_fsunmount,
41  .utime_h = rtems_filesystem_default_utime,
42  .symlink_h = rtems_filesystem_default_symlink,
43  .readlink_h = rtems_filesystem_default_readlink,
44  .rename_h = rtems_filesystem_default_rename,
45  .statvfs_h = rtems_filesystem_default_statvfs
46};
47
48static const IMFS_node_control *const
49  IMFS_mini_node_controls [IMFS_TYPE_COUNT] = {
50  [IMFS_DIRECTORY] = &IMFS_node_control_directory,
51  [IMFS_DEVICE] = &IMFS_node_control_device,
52  [IMFS_HARD_LINK] = &IMFS_node_control_enosys,
53  [IMFS_SYM_LINK] = &IMFS_node_control_enosys,
54  [IMFS_MEMORY_FILE] = &IMFS_node_control_memfile,
55  [IMFS_LINEAR_FILE] = &IMFS_node_control_linfile,
56  [IMFS_FIFO] = &IMFS_node_control_enosys
57};
58
59int miniIMFS_initialize(
60  rtems_filesystem_mount_table_entry_t *mt_entry,
61  const void                           *data
62)
63{
64  return IMFS_initialize_support(
65    mt_entry,
66    &miniIMFS_ops,
67    IMFS_mini_node_controls
68  );
69}
Note: See TracBrowser for help on using the repository browser.