source: rtems/cpukit/libfs/src/devfs/devfs_init.c @ ae55da72

4.115
Last change on this file since ae55da72 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*
2 *  The license and distribution terms for this file may be
3 *  found in the file LICENSE in this distribution or at
4 *  http://www.rtems.com/license/LICENSE.
5 */
6
7#if HAVE_CONFIG_H
8  #include "config.h"
9#endif
10
11#include "devfs.h"
12
13const rtems_filesystem_operations_table devFS_ops = {
14  .lock_h = rtems_filesystem_default_lock,
15  .unlock_h = rtems_filesystem_default_unlock,
16  .eval_path_h = devFS_eval_path,
17  .link_h = rtems_filesystem_default_link,
18  .are_nodes_equal_h = rtems_filesystem_default_are_nodes_equal,
19  .node_type_h = devFS_node_type,
20  .mknod_h = devFS_mknod,
21  .rmnod_h = rtems_filesystem_default_rmnod,
22  .fchmod_h = rtems_filesystem_default_fchmod,
23  .chown_h = rtems_filesystem_default_chown,
24  .clonenod_h = rtems_filesystem_default_clonenode,
25  .freenod_h = rtems_filesystem_default_freenode,
26  .mount_h = rtems_filesystem_default_mount,
27  .fsmount_me_h = devFS_initialize,
28  .unmount_h = rtems_filesystem_default_unmount,
29  .fsunmount_me_h = rtems_filesystem_default_fsunmount,
30  .utime_h = rtems_filesystem_default_utime,
31  .symlink_h = rtems_filesystem_default_symlink,
32  .readlink_h = rtems_filesystem_default_readlink,
33  .rename_h = rtems_filesystem_default_rename,
34  .statvfs_h = rtems_filesystem_default_statvfs
35};
36
37const rtems_filesystem_file_handlers_r devFS_file_handlers = {
38  .open_h = devFS_open,
39  .close_h = devFS_close,
40  .read_h = devFS_read,
41  .write_h = devFS_write,
42  .ioctl_h = devFS_ioctl,
43  .lseek_h = rtems_filesystem_default_lseek_file,
44  .fstat_h = devFS_stat,
45  .ftruncate_h = rtems_filesystem_default_ftruncate,
46  .fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
47  .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
48  .fcntl_h = rtems_filesystem_default_fcntl
49};
50
51int devFS_initialize(
52  rtems_filesystem_mount_table_entry_t *mt_entry,
53  const void *data
54)
55{
56  int rv = 0;
57
58  if (data != NULL) {
59    mt_entry->immutable_fs_info = data;
60    mt_entry->mt_fs_root->location.handlers = &devFS_file_handlers;
61    mt_entry->mt_fs_root->location.ops = &devFS_ops;
62  } else {
63    errno = EINVAL;
64    rv = -1;
65  }
66
67  return rv;
68}
69
Note: See TracBrowser for help on using the repository browser.