diff options
Diffstat (limited to '')
26 files changed, 311 insertions, 125 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index e79d147e99..ee9968877d 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,28 @@ +2010-06-29 Jennifer.Averett <Jennifer.Averett@OARcorp.com> + + * libcsupport/include/rtems/libio.h, libfs/Makefile.am, + libfs/src/defaults/default_chown.c, + libfs/src/defaults/default_evalpath.c, + libfs/src/defaults/default_freenode.c, + libfs/src/defaults/default_fsmount.c, + libfs/src/defaults/default_link.c, + libfs/src/defaults/default_mount.c, + libfs/src/defaults/default_rename.c, + libfs/src/defaults/default_statvfs.c, + libfs/src/defaults/default_symlink.c, + libfs/src/defaults/default_unlink.c, + libfs/src/defaults/default_utime.c, libfs/src/devfs/devfs_init.c, + libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs_init.c, + libfs/src/nfsclient/src/nfs.c, libfs/src/rfs/rtems-rfs-rtems.c, + wrapup/Makefile.am: Fixed typo in default names. Added default + methods into filesystem tables. + * libfs/src/defaults/default_close.c, + libfs/src/defaults/default_evaluate_link.c, + libfs/src/defaults/default_fpathconf.c, + libfs/src/defaults/default_fsunmount.c, + libfs/src/defaults/default_open.c, + libfs/src/defaults/default_unmount.c: New files. + 2010-06-29 Joel Sherrill <joel.sherrill@oarcorp.com> * configure.ac, score/include/rtems/score/percpu.h: Add diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index b3cb8207ca..3b5e373b68 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -360,6 +360,27 @@ struct _rtems_filesystem_file_handlers_r { */ rtems_filesystem_rmnod_t rmnod_h; }; +/** + * This method defines the interface to the default open(2) + * system call support which is provided by a file system + * implementation. + */ +int rtems_filesystem_default_open( + rtems_libio_t *iop, + const char *pathname, + uint32_t flag, + uint32_t mode +); + +/** + * This method defines the interface to the default close(2) + * system call support which is provided by a file system + * implementation. + */ +int rtems_filesystem_default_close( + rtems_libio_t *iop +); + /** * This method defines the interface to the default read(2) diff --git a/cpukit/libfs/Makefile.am b/cpukit/libfs/Makefile.am index 36fd346bcb..d75c600d4a 100644 --- a/cpukit/libfs/Makefile.am +++ b/cpukit/libfs/Makefile.am @@ -16,18 +16,21 @@ EXTRA_DIST = README noinst_LIBRARIES = libdefaultfs.a libdefaultfs_a_SOURCES = \ - src/defaults/default_chown.c src/defaults/default_fdatasync.c \ - src/defaults/default_fsync.c src/defaults/default_lseek.c \ - src/defaults/default_rename.c src/defaults/default_unlink.c \ - src/defaults/default_evalpath.c src/defaults/default_freenode.c \ - src/defaults/default_ftruncate.c src/defaults/default_mount.c \ - src/defaults/default_rmnod.c src/defaults/default_utime.c \ - src/defaults/default_fchmod.c src/defaults/default_fsmount.c \ - src/defaults/default_ioctl.c src/defaults/default_read.c \ - src/defaults/default_statvfs.c src/defaults/default_write.c \ - src/defaults/default_fcntl.c src/defaults/default_fstat.c \ - src/defaults/default_link.c src/defaults/default_readlink.c \ - src/defaults/default_symlink.c + src/defaults/default_fchmod.c src/defaults/default_freenode.c \ + src/defaults/default_fsync.c src/defaults/default_link.c \ + src/defaults/default_read.c src/defaults/default_rmnod.c \ + src/defaults/default_unlink.c src/defaults/default_chown.c \ + src/defaults/default_fcntl.c src/defaults/default_fsmount.c \ + src/defaults/default_ftruncate.c src/defaults/default_lseek.c \ + src/defaults/default_readlink.c src/defaults/default_statvfs.c \ + src/defaults/default_utime.c src/defaults/default_evalpath.c \ + src/defaults/default_fdatasync.c src/defaults/default_fstat.c \ + src/defaults/default_ioctl.c src/defaults/default_mount.c \ + src/defaults/default_rename.c src/defaults/default_symlink.c \ + src/defaults/default_write.c src/defaults/default_fpathconf.c \ + src/defaults/default_unmount.c src/defaults/default_evaluate_link.c \ + src/defaults/default_open.c src/defaults/default_close.c \ + src/defaults/default_fsunmount.c noinst_LIBRARIES += libimfs.a libimfs_a_SOURCES = diff --git a/cpukit/libfs/src/defaults/default_chown.c b/cpukit/libfs/src/defaults/default_chown.c index 36fc907168..82cb0b694f 100644 --- a/cpukit/libfs/src/defaults/default_chown.c +++ b/cpukit/libfs/src/defaults/default_chown.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_chown_t( +int rtems_filesystem_default_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ diff --git a/cpukit/libfs/src/defaults/default_close.c b/cpukit/libfs/src/defaults/default_close.c new file mode 100644 index 0000000000..46ec8803d3 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_close.c @@ -0,0 +1,21 @@ +/* + * COPYRIGHT (c) 2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <rtems/libio.h> +#include <rtems/libio_.h> +#include <rtems/seterr.h> + +int rtems_filesystem_default_close( + rtems_libio_t *iop +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_evalpath.c b/cpukit/libfs/src/defaults/default_evalpath.c index b620e9e239..03e4580b94 100644 --- a/cpukit/libfs/src/defaults/default_evalpath.c +++ b/cpukit/libfs/src/defaults/default_evalpath.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_evalpath_t( +int rtems_filesystem_default_evalpath( const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ diff --git a/cpukit/libfs/src/defaults/default_evaluate_link.c b/cpukit/libfs/src/defaults/default_evaluate_link.c new file mode 100644 index 0000000000..77b5ce8331 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_evaluate_link.c @@ -0,0 +1,24 @@ +/* + * COPYRIGHT (c) 2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <rtems/libio.h> +#include <rtems/libio_.h> +#include <rtems/seterr.h> + +int rtems_filesystem_default_evaluate_link( + rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ + int flags /* IN */ +) +{ + pathloc = NULL; + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} + diff --git a/cpukit/libfs/src/defaults/default_fpathconf.c b/cpukit/libfs/src/defaults/default_fpathconf.c new file mode 100644 index 0000000000..f65d7d92fc --- /dev/null +++ b/cpukit/libfs/src/defaults/default_fpathconf.c @@ -0,0 +1,22 @@ +/* + * COPYRIGHT (c) 2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <rtems/libio.h> +#include <rtems/libio_.h> +#include <rtems/seterr.h> + +int rtems_filesystem_default_fpathconf( + rtems_libio_t *iop, + int name +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_freenode.c b/cpukit/libfs/src/defaults/default_freenode.c index 8cc74f430c..bb231d13f7 100644 --- a/cpukit/libfs/src/defaults/default_freenode.c +++ b/cpukit/libfs/src/defaults/default_freenode.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_freenode_t( +int rtems_filesystem_default_freenode( rtems_filesystem_location_info_t *pathloc /* IN */ ) { diff --git a/cpukit/libfs/src/defaults/default_fsmount.c b/cpukit/libfs/src/defaults/default_fsmount.c index 54fa9578ea..5a442c82b6 100644 --- a/cpukit/libfs/src/defaults/default_fsmount.c +++ b/cpukit/libfs/src/defaults/default_fsmount.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_fsmount_t( +int rtems_filesystem_default_fsmount( rtems_filesystem_mount_table_entry_t *mt_entry, /* IN */ const void *data /* IN */ ) diff --git a/cpukit/libfs/src/defaults/default_fsunmount.c b/cpukit/libfs/src/defaults/default_fsunmount.c new file mode 100644 index 0000000000..e879f5c2f8 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_fsunmount.c @@ -0,0 +1,21 @@ +/* + * COPYRIGHT (c) 2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <rtems/libio.h> +#include <rtems/libio_.h> +#include <rtems/seterr.h> + +int rtems_filesystem_default_fsunmount( + rtems_filesystem_mount_table_entry_t *mt_entry /* IN */ +) +{ + return 0; +} diff --git a/cpukit/libfs/src/defaults/default_link.c b/cpukit/libfs/src/defaults/default_link.c index af6fd3946c..d9bc913b27 100644 --- a/cpukit/libfs/src/defaults/default_link.c +++ b/cpukit/libfs/src/defaults/default_link.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_link_t( +int rtems_filesystem_default_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *name /* IN */ diff --git a/cpukit/libfs/src/defaults/default_mount.c b/cpukit/libfs/src/defaults/default_mount.c index f487d7c8fd..9063b554bc 100644 --- a/cpukit/libfs/src/defaults/default_mount.c +++ b/cpukit/libfs/src/defaults/default_mount.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_mount_t ( +int rtems_filesystem_default_mount ( rtems_filesystem_mount_table_entry_t *mt_entry /* IN */ ) { diff --git a/cpukit/libfs/src/defaults/default_open.c b/cpukit/libfs/src/defaults/default_open.c new file mode 100644 index 0000000000..b119fbf5be --- /dev/null +++ b/cpukit/libfs/src/defaults/default_open.c @@ -0,0 +1,24 @@ +/* + * COPYRIGHT (c) 2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <rtems/libio.h> +#include <rtems/libio_.h> +#include <rtems/seterr.h> + +int rtems_filesystem_default_open( + rtems_libio_t *iop, + const char *pathname, + uint32_t flag, + uint32_t mode +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_rename.c b/cpukit/libfs/src/defaults/default_rename.c index 3e3b2170fe..93bf15f2e0 100644 --- a/cpukit/libfs/src/defaults/default_rename.c +++ b/cpukit/libfs/src/defaults/default_rename.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_rename_t( +int rtems_filesystem_default_rename( rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ diff --git a/cpukit/libfs/src/defaults/default_statvfs.c b/cpukit/libfs/src/defaults/default_statvfs.c index ac0b64b9ca..22d891815f 100644 --- a/cpukit/libfs/src/defaults/default_statvfs.c +++ b/cpukit/libfs/src/defaults/default_statvfs.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_statvfs_t( +int rtems_filesystem_default_statvfs( rtems_filesystem_location_info_t *loc, /* IN */ struct statvfs *buf /* OUT */ ) diff --git a/cpukit/libfs/src/defaults/default_symlink.c b/cpukit/libfs/src/defaults/default_symlink.c index 171f4ad462..8985d76aef 100644 --- a/cpukit/libfs/src/defaults/default_symlink.c +++ b/cpukit/libfs/src/defaults/default_symlink.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_symlink_t( +int rtems_filesystem_default_symlink( rtems_filesystem_location_info_t *loc, /* IN */ const char *link_name, /* IN */ const char *node_name diff --git a/cpukit/libfs/src/defaults/default_unlink.c b/cpukit/libfs/src/defaults/default_unlink.c index 0e51a2d71c..cf633c6ce1 100644 --- a/cpukit/libfs/src/defaults/default_unlink.c +++ b/cpukit/libfs/src/defaults/default_unlink.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_unlink_t( +int rtems_filesystem_default_unlink( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) diff --git a/cpukit/libfs/src/defaults/default_unmount.c b/cpukit/libfs/src/defaults/default_unmount.c new file mode 100644 index 0000000000..9fc53c060f --- /dev/null +++ b/cpukit/libfs/src/defaults/default_unmount.c @@ -0,0 +1,21 @@ +/* + * COPYRIGHT (c) 2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <rtems/libio.h> +#include <rtems/libio_.h> +#include <rtems/seterr.h> + +int rtems_filesystem_default_unmount( + rtems_filesystem_mount_table_entry_t *mt_entry /* IN */ +) +{ + return 0; +} diff --git a/cpukit/libfs/src/defaults/default_utime.c b/cpukit/libfs/src/defaults/default_utime.c index ae8be428a3..77a2f2e8d6 100644 --- a/cpukit/libfs/src/defaults/default_utime.c +++ b/cpukit/libfs/src/defaults/default_utime.c @@ -13,7 +13,7 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -int rtems_filesystem_default_utime_t( +int rtems_filesystem_default_utime( rtems_filesystem_location_info_t *pathloc, /* IN */ time_t actime, /* IN */ time_t modtime /* IN */ diff --git a/cpukit/libfs/src/devfs/devfs_init.c b/cpukit/libfs/src/devfs/devfs_init.c index 4ce616ebb2..5f6521a045 100644 --- a/cpukit/libfs/src/devfs/devfs_init.c +++ b/cpukit/libfs/src/devfs/devfs_init.c @@ -20,21 +20,22 @@ rtems_filesystem_operations_table devFS_ops = { devFS_evaluate_path, devFS_evaluate_for_make, - NULL, - NULL, + rtems_filesystem_default_link, + rtems_filesystem_default_unlink, devFS_node_type, devFS_mknod, - NULL, - NULL, - NULL, + rtems_filesystem_default_chown, + rtems_filesystem_default_freenode, + rtems_filesystem_default_mount, devFS_initialize, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL + rtems_filesystem_default_unmount, + rtems_filesystem_default_fsunmount, + rtems_filesystem_default_utime, + rtems_filesystem_default_evaluate_link, + rtems_filesystem_default_symlink, + rtems_filesystem_default_readlink, + rtems_filesystem_default_rename, + rtems_filesystem_default_statvfs }; @@ -45,15 +46,15 @@ rtems_filesystem_file_handlers_r devFS_file_handlers = devFS_read, devFS_write, devFS_ioctl, - NULL, + rtems_filesystem_default_lseek, devFS_stat, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL + rtems_filesystem_default_fchmod, + rtems_filesystem_default_ftruncate, + rtems_filesystem_default_fpathconf, + rtems_filesystem_default_fsync, + rtems_filesystem_default_fdatasync, + rtems_filesystem_default_fcntl, + rtems_filesystem_default_rmnod }; diff --git a/cpukit/libfs/src/dosfs/msdos_init.c b/cpukit/libfs/src/dosfs/msdos_init.c index 20d45764ec..217e0c1f3a 100644 --- a/cpukit/libfs/src/dosfs/msdos_init.c +++ b/cpukit/libfs/src/dosfs/msdos_init.c @@ -22,22 +22,22 @@ const rtems_filesystem_operations_table msdos_ops = { .evalpath_h = msdos_eval_path, .evalformake_h = msdos_eval4make, - .link_h = NULL, + .link_h = rtems_filesystem_default_link, .unlink_h = msdos_file_rmnod, .node_type_h = msdos_node_type, .mknod_h = msdos_mknod, - .chown_h = NULL, + .chown_h = rtems_filesystem_default_chown, .freenod_h = msdos_free_node_info, - .mount_h = NULL, + .mount_h = rtems_filesystem_default_mount, .fsmount_me_h = rtems_dosfs_initialize, - .unmount_h = NULL, + .unmount_h = rtems_filesystem_default_unmount, .fsunmount_me_h = msdos_shut_down, - .utime_h = NULL, - .eval_link_h = NULL, - .symlink_h = NULL, - .readlink_h = NULL, + .utime_h = rtems_filesystem_default_utime, + .eval_link_h = rtems_filesystem_default_evaluate_link, + .symlink_h = rtems_filesystem_default_symlink, + .readlink_h = rtems_filesystem_default_readlink, .rename_h = msdos_rename, - .statvfs_h = NULL + .statvfs_h = rtems_filesystem_default_statvfs }; /* msdos_initialize -- diff --git a/cpukit/libfs/src/imfs/imfs_init.c b/cpukit/libfs/src/imfs/imfs_init.c index ebb00278d5..0631093043 100644 --- a/cpukit/libfs/src/imfs/imfs_init.c +++ b/cpukit/libfs/src/imfs/imfs_init.c @@ -43,7 +43,7 @@ const rtems_filesystem_operations_table IMFS_ops = { .symlink_h = IMFS_symlink, .readlink_h = IMFS_readlink, .rename_h = IMFS_rename, - .statvfs_h = NULL + .statvfs_h = rtems_filesystem_default_statvfs }; int IMFS_initialize( diff --git a/cpukit/libfs/src/nfsclient/src/nfs.c b/cpukit/libfs/src/nfsclient/src/nfs.c index de902cbbad..6882d1a66e 100644 --- a/cpukit/libfs/src/nfsclient/src/nfs.c +++ b/cpukit/libfs/src/nfsclient/src/nfs.c @@ -2472,21 +2472,23 @@ cleanup: struct _rtems_filesystem_operations_table nfs_fs_ops = { nfs_evalpath, /* MANDATORY */ nfs_evalformake, /* MANDATORY; may set errno=ENOSYS and return -1 */ - nfs_link, /* OPTIONAL; may be NULL */ - nfs_unlink, /* OPTIONAL; may be NULL */ - nfs_node_type, /* OPTIONAL; may be NULL; BUG in mount - no test!! */ - nfs_mknod, /* OPTIONAL; may be NULL */ - nfs_chown, /* OPTIONAL; may be NULL */ - nfs_freenode, /* OPTIONAL; may be NULL; (release node_access) */ - nfs_mount, /* OPTIONAL; may be NULL */ - rtems_nfsfs_initialize, /* OPTIONAL; may be NULL -- not used anymore */ - nfs_unmount, /* OPTIONAL; may be NULL */ - nfs_fsunmount_me, /* OPTIONAL; may be NULL */ - nfs_utime, /* OPTIONAL; may be NULL */ - nfs_eval_link, /* OPTIONAL; may be NULL */ - nfs_symlink, /* OPTIONAL; may be NULL */ - nfs_readlink, /* OPTIONAL; may be NULL */ - NULL /* OPTIONAL; may be NULL */ + nfs_link, /* OPTIONAL; may be defaulted */ + nfs_unlink, /* OPTIONAL; may be defaulted */ + nfs_node_type, /* OPTIONAL; may be defaulted; BUG in mount - no test!! */ + nfs_mknod, /* OPTIONAL; may be defaulted */ + nfs_chown, /* OPTIONAL; may be defaulted */ + nfs_freenode, /* OPTIONAL; may be defaulted; (release node_access) */ + nfs_mount, /* OPTIONAL; may be defaulted */ + rtems_nfsfs_initialize, /* OPTIONAL; may be defaulted -- not used anymore */ + nfs_unmount, /* OPTIONAL; may be defaulted */ + nfs_fsunmount_me, /* OPTIONAL; may be defaulted */ + nfs_utime, /* OPTIONAL; may be defaulted */ + nfs_eval_link, /* OPTIONAL; may be defaulted */ + nfs_symlink, /* OPTIONAL; may be defaulted */ + nfs_readlink, /* OPTIONAL; may be defaulted */ + rtems_filesystem_default_rename, /* OPTIONAL; may be defaulted */ + rtems_filesystem_default_statvfs /* OPTIONAL; may be defaulted */ + }; /***************************************** @@ -3125,58 +3127,58 @@ static int nfs_dir_rmnod( /* the file handlers table */ static struct _rtems_filesystem_file_handlers_r nfs_file_file_handlers = { - nfs_file_open, /* OPTIONAL; may be NULL */ - nfs_file_close, /* OPTIONAL; may be NULL */ - nfs_file_read, /* OPTIONAL; may be NULL */ - nfs_file_write, /* OPTIONAL; may be NULL */ - nfs_file_ioctl, /* OPTIONAL; may be NULL */ - nfs_file_lseek, /* OPTIONAL; may be NULL */ - nfs_fstat, /* OPTIONAL; may be NULL */ - nfs_fchmod, /* OPTIONAL; may be NULL */ - nfs_file_ftruncate, /* OPTIONAL; may be NULL */ - nfs_file_fpathconf, /* OPTIONAL; may be NULL - UNUSED */ - nfs_file_fsync, /* OPTIONAL; may be NULL */ - nfs_file_fdatasync, /* OPTIONAL; may be NULL */ - nfs_file_fcntl, /* OPTIONAL; may be NULL */ - nfs_unlink, /* OPTIONAL; may be NULL */ + nfs_file_open, /* OPTIONAL; may be defaulted */ + nfs_file_close, /* OPTIONAL; may be defaulted */ + nfs_file_read, /* OPTIONAL; may be defaulted */ + nfs_file_write, /* OPTIONAL; may be defaulted */ + nfs_file_ioctl, /* OPTIONAL; may be defaulted */ + nfs_file_lseek, /* OPTIONAL; may be defaulted */ + nfs_fstat, /* OPTIONAL; may be defaulted */ + nfs_fchmod, /* OPTIONAL; may be defaulted */ + nfs_file_ftruncate, /* OPTIONAL; may be defaulted */ + nfs_file_fpathconf, /* OPTIONAL; may be defaulted - UNUSED */ + nfs_file_fsync, /* OPTIONAL; may be defaulted */ + nfs_file_fdatasync, /* OPTIONAL; may be defaulted */ + nfs_file_fcntl, /* OPTIONAL; may be defaulted */ + nfs_unlink, /* OPTIONAL; may be defaulted */ }; /* the directory handlers table */ static struct _rtems_filesystem_file_handlers_r nfs_dir_file_handlers = { - nfs_dir_open, /* OPTIONAL; may be NULL */ - nfs_dir_close, /* OPTIONAL; may be NULL */ - nfs_dir_read, /* OPTIONAL; may be NULL */ - nfs_dir_write, /* OPTIONAL; may be NULL */ - nfs_dir_ioctl, /* OPTIONAL; may be NULL */ - nfs_dir_lseek, /* OPTIONAL; may be NULL */ - nfs_fstat, /* OPTIONAL; may be NULL */ - nfs_fchmod, /* OPTIONAL; may be NULL */ - nfs_dir_ftruncate, /* OPTIONAL; may be NULL */ - nfs_dir_fpathconf, /* OPTIONAL; may be NULL - UNUSED */ - nfs_dir_fsync, /* OPTIONAL; may be NULL */ - nfs_dir_fdatasync, /* OPTIONAL; may be NULL */ - nfs_dir_fcntl, /* OPTIONAL; may be NULL */ - nfs_dir_rmnod, /* OPTIONAL; may be NULL */ + nfs_dir_open, /* OPTIONAL; may be defaulted */ + nfs_dir_close, /* OPTIONAL; may be defaulted */ + nfs_dir_read, /* OPTIONAL; may be defaulted */ + nfs_dir_write, /* OPTIONAL; may be defaulted */ + nfs_dir_ioctl, /* OPTIONAL; may be defaulted */ + nfs_dir_lseek, /* OPTIONAL; may be defaulted */ + nfs_fstat, /* OPTIONAL; may be defaulted */ + nfs_fchmod, /* OPTIONAL; may be defaulted */ + nfs_dir_ftruncate, /* OPTIONAL; may be defaulted */ + nfs_dir_fpathconf, /* OPTIONAL; may be defaulted - UNUSED */ + nfs_dir_fsync, /* OPTIONAL; may be defaulted */ + nfs_dir_fdatasync, /* OPTIONAL; may be defaulted */ + nfs_dir_fcntl, /* OPTIONAL; may be defaulted */ + nfs_dir_rmnod, /* OPTIONAL; may be defaulted */ }; /* the link handlers table */ static struct _rtems_filesystem_file_handlers_r nfs_link_file_handlers = { - nfs_link_open, /* OPTIONAL; may be NULL */ - nfs_link_close, /* OPTIONAL; may be NULL */ - nfs_link_read, /* OPTIONAL; may be NULL */ - nfs_link_write, /* OPTIONAL; may be NULL */ - nfs_link_ioctl, /* OPTIONAL; may be NULL */ - nfs_link_lseek, /* OPTIONAL; may be NULL */ - nfs_fstat, /* OPTIONAL; may be NULL */ - nfs_fchmod, /* OPTIONAL; may be NULL */ - nfs_link_ftruncate, /* OPTIONAL; may be NULL */ - nfs_link_fpathconf, /* OPTIONAL; may be NULL - UNUSED */ - nfs_link_fsync, /* OPTIONAL; may be NULL */ - nfs_link_fdatasync, /* OPTIONAL; may be NULL */ - nfs_link_fcntl, /* OPTIONAL; may be NULL */ - nfs_unlink, /* OPTIONAL; may be NULL */ + nfs_link_open, /* OPTIONAL; may be defaulted */ + nfs_link_close, /* OPTIONAL; may be defaulted */ + nfs_link_read, /* OPTIONAL; may be defaulted */ + nfs_link_write, /* OPTIONAL; may be defaulted */ + nfs_link_ioctl, /* OPTIONAL; may be defaulted */ + nfs_link_lseek, /* OPTIONAL; may be defaulted */ + nfs_fstat, /* OPTIONAL; may be defaulted */ + nfs_fchmod, /* OPTIONAL; may be defaulted */ + nfs_link_ftruncate, /* OPTIONAL; may be defaulted */ + nfs_link_fpathconf, /* OPTIONAL; may be defaulted - UNUSED */ + nfs_link_fsync, /* OPTIONAL; may be defaulted */ + nfs_link_fdatasync, /* OPTIONAL; may be defaulted */ + nfs_link_fcntl, /* OPTIONAL; may be defaulted */ + nfs_unlink, /* OPTIONAL; may be defaulted */ }; /* we need a dummy driver entry table to get a diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c index 3afa351302..845162863e 100644 --- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c +++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c @@ -1203,19 +1203,19 @@ rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc, */ const rtems_filesystem_file_handlers_r rtems_rfs_rtems_link_handlers = { - .open_h = NULL, - .close_h = NULL, - .read_h = NULL, - .write_h = NULL, - .ioctl_h = NULL, - .lseek_h = NULL, + .open_h = rtems_filesystem_default_open, + .close_h = rtems_filesystem_default_close, + .read_h = rtems_filesystem_default_read, + .write_h = rtems_filesystem_default_write, + .ioctl_h = rtems_filesystem_default_ioctl, + .lseek_h = rtems_filesystem_default_lseek, .fstat_h = rtems_rfs_rtems_stat, - .fchmod_h = NULL, - .ftruncate_h = NULL, - .fpathconf_h = NULL, - .fsync_h = NULL, - .fdatasync_h = NULL, - .fcntl_h = NULL, + .fchmod_h = rtems_filesystem_default_fchmod, + .ftruncate_h = rtems_filesystem_default_ftruncate, + .fpathconf_h = rtems_filesystem_default_fpathconf, + .fsync_h = rtems_filesystem_default_fsync, + .fdatasync_h = rtems_filesystem_default_fdatasync, + .fcntl_h = rtems_filesystem_default_fcntl, .rmnod_h = rtems_rfs_rtems_rmnod }; @@ -1240,12 +1240,12 @@ const rtems_filesystem_operations_table rtems_rfs_ops = .mknod_h = rtems_rfs_rtems_mknod, .chown_h = rtems_rfs_rtems_chown, .freenod_h = rtems_rfs_rtems_freenodinfo, - .mount_h = NULL, + .mount_h = rtems_filesystem_default_mount, .fsmount_me_h = rtems_rfs_rtems_initialise, - .unmount_h = NULL, + .unmount_h = rtems_filesystem_default_unmount, .fsunmount_me_h = rtems_rfs_rtems_shutdown, .utime_h = rtems_rfs_rtems_utime, - .eval_link_h = NULL, /* never called cause we lie in the node type */ + .eval_link_h = rtems_filesystem_default_evaluate_link, /* never called cause we lie in the node type */ .symlink_h = rtems_rfs_rtems_symlink, .readlink_h = rtems_rfs_rtems_readlink, .rename_h = rtems_rfs_rtems_rename, diff --git a/cpukit/wrapup/Makefile.am b/cpukit/wrapup/Makefile.am index 81bb9e5a18..4622165fdd 100644 --- a/cpukit/wrapup/Makefile.am +++ b/cpukit/wrapup/Makefile.am @@ -27,6 +27,7 @@ TMP_LIBS += ../libblock/libblock.a if LIBDOSFS TMP_LIBS += ../libfs/libdosfs.a endif +TMP_LIBS += ../libfs/libdefaultfs.a TMP_LIBS += ../libfs/libimfs.a TMP_LIBS += ../libfs/librfs.a |