source: rtems/cpukit/libfs/src/imfs/imfs_init.c @ b51d8a4

4.11
Last change on this file since b51d8a4 was b51d8a4, checked in by Chris Johns <chrisj@…>, on Dec 10, 2013 at 1:30:20 AM

libfs/imfs: Set the FIFO control block.

The FIFO was incorrectly set to the default control block.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup LibFSIMFS
5 *
6 * @brief 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.com/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 IMFS_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 = IMFS_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 = IMFS_fchmod,
34  .chown_h = IMFS_chown,
35  .clonenod_h = IMFS_node_clone,
36  .freenod_h = IMFS_node_free,
37  .mount_h = IMFS_mount,
38  .fsmount_me_h = IMFS_initialize,
39  .unmount_h = IMFS_unmount,
40  .fsunmount_me_h = IMFS_fsunmount,
41  .utime_h = IMFS_utime,
42  .symlink_h = IMFS_symlink,
43  .readlink_h = IMFS_readlink,
44  .rename_h = IMFS_rename,
45  .statvfs_h = rtems_filesystem_default_statvfs
46};
47
48static const IMFS_node_control *const
49  IMFS_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_hard_link,
53  [IMFS_SYM_LINK] = &IMFS_node_control_sym_link,
54  [IMFS_MEMORY_FILE] = &IMFS_node_control_memfile,
55  [IMFS_LINEAR_FILE] = &IMFS_node_control_linfile,
56  [IMFS_FIFO] = &IMFS_node_control_fifo
57};
58
59int IMFS_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    &IMFS_ops,
67    IMFS_node_controls
68  );
69}
Note: See TracBrowser for help on using the repository browser.