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.org/license/LICENSE. |
---|
16 | */ |
---|
17 | |
---|
18 | #if HAVE_CONFIG_H |
---|
19 | #include "config.h" |
---|
20 | #endif |
---|
21 | |
---|
22 | #include "imfs.h" |
---|
23 | |
---|
24 | const 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 | .mknod_h = IMFS_mknod, |
---|
31 | .rmnod_h = IMFS_rmnod, |
---|
32 | .fchmod_h = IMFS_fchmod, |
---|
33 | .chown_h = IMFS_chown, |
---|
34 | .clonenod_h = IMFS_node_clone, |
---|
35 | .freenod_h = IMFS_node_free, |
---|
36 | .mount_h = IMFS_mount, |
---|
37 | .unmount_h = IMFS_unmount, |
---|
38 | .fsunmount_me_h = IMFS_fsunmount, |
---|
39 | .utime_h = IMFS_utime, |
---|
40 | .symlink_h = IMFS_symlink, |
---|
41 | .readlink_h = IMFS_readlink, |
---|
42 | .rename_h = IMFS_rename, |
---|
43 | .statvfs_h = rtems_filesystem_default_statvfs |
---|
44 | }; |
---|
45 | |
---|
46 | static const IMFS_node_control *const |
---|
47 | IMFS_node_controls [IMFS_TYPE_COUNT] = { |
---|
48 | [IMFS_DIRECTORY] = &IMFS_node_control_directory, |
---|
49 | [IMFS_DEVICE] = &IMFS_node_control_device, |
---|
50 | [IMFS_MEMORY_FILE] = &IMFS_node_control_memfile, |
---|
51 | [IMFS_FIFO] = &IMFS_node_control_enosys |
---|
52 | }; |
---|
53 | |
---|
54 | int IMFS_initialize( |
---|
55 | rtems_filesystem_mount_table_entry_t *mt_entry, |
---|
56 | const void *data |
---|
57 | ) |
---|
58 | { |
---|
59 | return IMFS_initialize_support( |
---|
60 | mt_entry, |
---|
61 | &IMFS_ops, |
---|
62 | IMFS_node_controls |
---|
63 | ); |
---|
64 | } |
---|