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

4.115
Last change on this file since c625a641 was c625a641, checked in by Sebastian Huber <sebastian.huber@…>, on 12/21/14 at 19:12:28

Filesystem: Delete node type operation

Use the fstat handler instead.

  • 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  .mknod_h = IMFS_mknod,
31  .rmnod_h = IMFS_rmnod,
32  .fchmod_h = rtems_filesystem_default_fchmod,
33  .chown_h = rtems_filesystem_default_chown,
34  .clonenod_h = IMFS_node_clone,
35  .freenod_h = IMFS_node_free,
36  .mount_h = IMFS_mount,
37  .fsmount_me_h = miniIMFS_initialize,
38  .unmount_h = rtems_filesystem_default_unmount,
39  .fsunmount_me_h = rtems_filesystem_default_fsunmount,
40  .utime_h = rtems_filesystem_default_utime,
41  .symlink_h = rtems_filesystem_default_symlink,
42  .readlink_h = rtems_filesystem_default_readlink,
43  .rename_h = rtems_filesystem_default_rename,
44  .statvfs_h = rtems_filesystem_default_statvfs
45};
46
47static const IMFS_node_control *const
48  IMFS_mini_node_controls [IMFS_TYPE_COUNT] = {
49  [IMFS_DIRECTORY] = &IMFS_node_control_directory,
50  [IMFS_DEVICE] = &IMFS_node_control_device,
51  [IMFS_HARD_LINK] = &IMFS_node_control_enosys,
52  [IMFS_SYM_LINK] = &IMFS_node_control_enosys,
53  [IMFS_MEMORY_FILE] = &IMFS_node_control_memfile,
54  [IMFS_LINEAR_FILE] = &IMFS_node_control_linfile,
55  [IMFS_FIFO] = &IMFS_node_control_enosys
56};
57
58int miniIMFS_initialize(
59  rtems_filesystem_mount_table_entry_t *mt_entry,
60  const void                           *data
61)
62{
63  return IMFS_initialize_support(
64    mt_entry,
65    &miniIMFS_ops,
66    IMFS_mini_node_controls
67  );
68}
Note: See TracBrowser for help on using the repository browser.