diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2010-06-25 14:23:48 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2010-06-25 14:23:48 +0000 |
commit | f9a4e80f868d319f1bb5147bf1d6efd9c7c6fa88 (patch) | |
tree | 029611d728cf74cddf7a376c2671d227dd3dc1af /cpukit/libfs | |
parent | 2010-06-24 Gedare Bloom <giddyup44@yahoo.com> (diff) | |
download | rtems-f9a4e80f868d319f1bb5147bf1d6efd9c7c6fa88.tar.bz2 |
2010-06-25 Jennifer Averett <Jennifer.Averett@OARcorp.com
* libcsupport/include/rtems/libio.h, libfs/Makefile.am: Added default
filesystem handlers.
* libfs/src/defaults/default_chown.c,
libfs/src/defaults/default_evalpath.c,
libfs/src/defaults/default_fchmod.c,
libfs/src/defaults/default_fcntl.c,
libfs/src/defaults/default_fdatasync.c,
libfs/src/defaults/default_freenode.c,
libfs/src/defaults/default_fsmount.c,
libfs/src/defaults/default_fstat.c,
libfs/src/defaults/default_fsync.c,
libfs/src/defaults/default_ftruncate.c,
libfs/src/defaults/default_ioctl.c,
libfs/src/defaults/default_link.c,
libfs/src/defaults/default_lseek.c,
libfs/src/defaults/default_mount.c,
libfs/src/defaults/default_read.c,
libfs/src/defaults/default_readlink.c,
libfs/src/defaults/default_rename.c,
libfs/src/defaults/default_rmnod.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/defaults/default_write.c: New files.
Diffstat (limited to '')
24 files changed, 512 insertions, 1 deletions
diff --git a/cpukit/libfs/Makefile.am b/cpukit/libfs/Makefile.am index de397fb5e0..36fd346bcb 100644 --- a/cpukit/libfs/Makefile.am +++ b/cpukit/libfs/Makefile.am @@ -14,8 +14,22 @@ DIST_SUBDIRS = $(SUBDIRS) EXTRA_DIST = README -noinst_LIBRARIES = libimfs.a +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 +noinst_LIBRARIES += libimfs.a libimfs_a_SOURCES = libimfs_a_SOURCES += src/imfs/imfs_chown.c src/imfs/imfs_config.c \ diff --git a/cpukit/libfs/src/defaults/default_chown.c b/cpukit/libfs/src/defaults/default_chown.c new file mode 100644 index 0000000000..9916fdf16e --- /dev/null +++ b/cpukit/libfs/src/defaults/default_chown.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> + +int rtems_filesystem_default_chown_t( + rtems_filesystem_location_info_t *pathloc, /* IN */ + uid_t owner, /* IN */ + gid_t group /* IN */ +) +{ + 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 new file mode 100644 index 0000000000..1dbf093f15 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_evalpath.c @@ -0,0 +1,25 @@ +/* + * 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> + +int rtems_filesystem_default_evalpath_t( + const char *pathname, /* IN */ + size_t pathnamelen, /* IN */ + int flags, /* IN */ + rtems_filesystem_location_info_t *pathloc /* IN/OUT */ +) +{ + pathloc = NULL; + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} + diff --git a/cpukit/libfs/src/defaults/default_fchmod.c b/cpukit/libfs/src/defaults/default_fchmod.c new file mode 100644 index 0000000000..43a21e27f8 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_fchmod.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> + +int rtems_filesystem_default_fchmod( + rtems_filesystem_location_info_t *loc, + mode_t mode +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_fcntl.c b/cpukit/libfs/src/defaults/default_fcntl.c new file mode 100644 index 0000000000..ea49159144 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_fcntl.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> + +int rtems_filesystem_default_fcntl( + int cmd, + rtems_libio_t *iop +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_fdatasync.c b/cpukit/libfs/src/defaults/default_fdatasync.c new file mode 100644 index 0000000000..fa8e0bae2b --- /dev/null +++ b/cpukit/libfs/src/defaults/default_fdatasync.c @@ -0,0 +1,20 @@ +/* + * 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> + +int rtems_filesystem_default_fdatasync( + rtems_libio_t *iop +) +{ + 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 new file mode 100644 index 0000000000..502f92c6d3 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_freenode.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> + +int rtems_filesystem_default_freenode_t( + rtems_filesystem_location_info_t *pathloc /* IN */ +) +{ + return 0; +} + diff --git a/cpukit/libfs/src/defaults/default_fsmount.c b/cpukit/libfs/src/defaults/default_fsmount.c new file mode 100644 index 0000000000..65a85389d0 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_fsmount.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> + +int rtems_filesystem_default_fsmount_t( + rtems_filesystem_mount_table_entry_t *mt_entry, /* IN */ + const void *data /* IN */ +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_fstat.c b/cpukit/libfs/src/defaults/default_fstat.c new file mode 100644 index 0000000000..e02390e108 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_fstat.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> + +int rtems_filesystem_default_fstat( + rtems_filesystem_location_info_t *loc, + struct stat *buf +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_fsync.c b/cpukit/libfs/src/defaults/default_fsync.c new file mode 100644 index 0000000000..ff9d579062 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_fsync.c @@ -0,0 +1,20 @@ +/* + * 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> + +int rtems_filesystem_default_fsync( + rtems_libio_t *iop +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_ftruncate.c b/cpukit/libfs/src/defaults/default_ftruncate.c new file mode 100644 index 0000000000..529ac89aa8 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_ftruncate.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> + +int rtems_filesystem_default_ftruncate( + rtems_libio_t *iop, + rtems_off64_t length +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_ioctl.c b/cpukit/libfs/src/defaults/default_ioctl.c new file mode 100644 index 0000000000..307f350996 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_ioctl.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> + +int rtems_filesystem_default_ioctl( + rtems_libio_t *iop, + uint32_t command, + void *buffer +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_link.c b/cpukit/libfs/src/defaults/default_link.c new file mode 100644 index 0000000000..eda65913e6 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_link.c @@ -0,0 +1,23 @@ +/* + * 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> + +int rtems_filesystem_default_link_t( + rtems_filesystem_location_info_t *to_loc, /* IN */ + rtems_filesystem_location_info_t *parent_loc, /* IN */ + const char *name /* IN */ +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} + diff --git a/cpukit/libfs/src/defaults/default_lseek.c b/cpukit/libfs/src/defaults/default_lseek.c new file mode 100644 index 0000000000..c002baa478 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_lseek.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> + +rtems_off64_t rtems_filesystem_default_lseek( + rtems_libio_t *iop, + rtems_off64_t length, + int whence +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_mount.c b/cpukit/libfs/src/defaults/default_mount.c new file mode 100644 index 0000000000..652b6a29ca --- /dev/null +++ b/cpukit/libfs/src/defaults/default_mount.c @@ -0,0 +1,20 @@ +/* + * 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> + +int rtems_filesystem_default_mount_t ( + rtems_filesystem_mount_table_entry_t *mt_entry /* IN */ +) +{ + return 0; +} diff --git a/cpukit/libfs/src/defaults/default_read.c b/cpukit/libfs/src/defaults/default_read.c new file mode 100644 index 0000000000..24e7b95d6f --- /dev/null +++ b/cpukit/libfs/src/defaults/default_read.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> + +size_t rtems_filesystem_default_read( + rtems_libio_t *iop, + void *buffer, + size_t count +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_readlink.c b/cpukit/libfs/src/defaults/default_readlink.c new file mode 100644 index 0000000000..8f3b171ebb --- /dev/null +++ b/cpukit/libfs/src/defaults/default_readlink.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> + +int rtems_filesystem_default_readlink( + rtems_filesystem_location_info_t *loc, /* IN */ + char *buf, /* OUT */ + size_t bufsize +) +{ + 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 new file mode 100644 index 0000000000..f0a3dfc74e --- /dev/null +++ b/cpukit/libfs/src/defaults/default_rename.c @@ -0,0 +1,23 @@ +/* + * 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> + +int rtems_filesystem_default_rename_t( + 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 */ + const char *name /* IN */ +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_rmnod.c b/cpukit/libfs/src/defaults/default_rmnod.c new file mode 100644 index 0000000000..6d4efffb23 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_rmnod.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> + +int rtems_filesystem_default_rmnod( + rtems_filesystem_location_info_t *parent_loc, /* IN */ + rtems_filesystem_location_info_t *pathloc /* IN */ +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_statvfs.c b/cpukit/libfs/src/defaults/default_statvfs.c new file mode 100644 index 0000000000..af736df01c --- /dev/null +++ b/cpukit/libfs/src/defaults/default_statvfs.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> + +int rtems_filesystem_default_statvfs_t( + rtems_filesystem_location_info_t *loc, /* IN */ + struct statvfs *buf /* OUT */ +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_symlink.c b/cpukit/libfs/src/defaults/default_symlink.c new file mode 100644 index 0000000000..329c9f3ab3 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_symlink.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> + +int rtems_filesystem_default_symlink_t( + rtems_filesystem_location_info_t *loc, /* IN */ + const char *link_name, /* IN */ + const char *node_name +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_unlink.c b/cpukit/libfs/src/defaults/default_unlink.c new file mode 100644 index 0000000000..f952232fa0 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_unlink.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> + +int rtems_filesystem_default_unlink_t( + rtems_filesystem_location_info_t *parent_pathloc, /* IN */ + rtems_filesystem_location_info_t *pathloc /* IN */ +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_utime.c b/cpukit/libfs/src/defaults/default_utime.c new file mode 100644 index 0000000000..cb930a56c8 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_utime.c @@ -0,0 +1,23 @@ +/* + * 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> + +int rtems_filesystem_default_utime_t( + rtems_filesystem_location_info_t *pathloc, /* IN */ + time_t actime, /* IN */ + time_t modtime /* IN */ +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} + diff --git a/cpukit/libfs/src/defaults/default_write.c b/cpukit/libfs/src/defaults/default_write.c new file mode 100644 index 0000000000..1d74ee2128 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_write.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> + +ssize_t rtems_filesystem_default_write( + rtems_libio_t *iop, + const void *buffer, + size_t count +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} |