diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-07-15 07:36:37 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-07-15 07:36:37 +0000 |
commit | 1e01385ff01b077bb48b7fe92ce78b3066f8a99e (patch) | |
tree | e62717b2c7bedfeb2046d0c410041a8fa7c3b12e /cpukit/libfs/src/defaults | |
parent | 2010-07-14 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-1e01385ff01b077bb48b7fe92ce78b3066f8a99e.tar.bz2 |
2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/include/rtems/libio.h: Changed
rtems_filesystem_node_types_t to an enum. Declare
rtems_filesystem_handlers_default,
rtems_filesystem_operations_default,
rtems_filesystem_default_evalpath(),
rtems_filesystem_default_evalformake, and
rtems_filesystem_default_node_type().
* libfs/src/dosfs/msdos.h: Fixed msdos_node_type() prototype.
* libfs/src/defaults/default_evalformake.c,
libfs/src/defaults/default_handlers.c,
libfs/src/defaults/default_node_type.c,
libfs/src/defaults/default_ops.c: New files.
* libfs/Makefile.am: Reflect changes above.
Diffstat (limited to 'cpukit/libfs/src/defaults')
-rw-r--r-- | cpukit/libfs/src/defaults/default_evalformake.c | 32 | ||||
-rw-r--r-- | cpukit/libfs/src/defaults/default_handlers.c | 39 | ||||
-rw-r--r-- | cpukit/libfs/src/defaults/default_node_type.c | 29 | ||||
-rw-r--r-- | cpukit/libfs/src/defaults/default_ops.c | 43 |
4 files changed, 143 insertions, 0 deletions
diff --git a/cpukit/libfs/src/defaults/default_evalformake.c b/cpukit/libfs/src/defaults/default_evalformake.c new file mode 100644 index 0000000000..891d961dc1 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_evalformake.c @@ -0,0 +1,32 @@ +/** + * @file + * + * @ingroup LibIO + * + * @brief rtems_filesystem_default_evalformake() implementation. + */ + +/* + * Copyright (c) 2010 + * embedded brains GmbH + * Obere Lagerstr. 30 + * D-82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * 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. + */ + +#include <rtems/libio.h> +#include <rtems/seterr.h> + +int rtems_filesystem_default_evalformake( + const char *path, + rtems_filesystem_location_info_t *pathloc, + const char **name +) +{ + rtems_set_errno_and_return_minus_one( ENOTSUP ); +} diff --git a/cpukit/libfs/src/defaults/default_handlers.c b/cpukit/libfs/src/defaults/default_handlers.c new file mode 100644 index 0000000000..5343875295 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_handlers.c @@ -0,0 +1,39 @@ +/** + * @file + * + * @ingroup LibIO + * + * @brief rtems_filesystem_handlers_default definition. + */ + +/* + * Copyright (c) 2010 + * embedded brains GmbH + * Obere Lagerstr. 30 + * D-82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * 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. + */ + +#include <rtems/libio.h> + +const rtems_filesystem_file_handlers_r rtems_filesystem_handlers_default = { + .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_filesystem_default_fstat, + .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_filesystem_default_rmnod +}; diff --git a/cpukit/libfs/src/defaults/default_node_type.c b/cpukit/libfs/src/defaults/default_node_type.c new file mode 100644 index 0000000000..a118a04f72 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_node_type.c @@ -0,0 +1,29 @@ +/** + * @file + * + * @ingroup LibIO + * + * @brief rtems_filesystem_default_node_type() implementation. + */ + +/* + * Copyright (c) 2010 + * embedded brains GmbH + * Obere Lagerstr. 30 + * D-82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * 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. + */ + +#include <rtems/libio.h> + +rtems_filesystem_node_types_t rtems_filesystem_default_node_type( + rtems_filesystem_location_info_t *pathloc +) +{ + return RTEMS_FILESYSTEM_INVALID_NODE_TYPE; +} diff --git a/cpukit/libfs/src/defaults/default_ops.c b/cpukit/libfs/src/defaults/default_ops.c new file mode 100644 index 0000000000..575cf6b2d4 --- /dev/null +++ b/cpukit/libfs/src/defaults/default_ops.c @@ -0,0 +1,43 @@ +/** + * @file + * + * @ingroup LibIO + * + * @brief rtems_filesystem_operations_default definition. + */ + +/* + * Copyright (c) 2010 + * embedded brains GmbH + * Obere Lagerstr. 30 + * D-82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * 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. + */ + +#include <rtems/libio.h> + +const rtems_filesystem_operations_table rtems_filesystem_operations_default = { + .evalpath_h = rtems_filesystem_default_evalpath, + .evalformake_h = rtems_filesystem_default_evalformake, + .link_h = rtems_filesystem_default_link, + .unlink_h = rtems_filesystem_default_unlink, + .node_type_h = rtems_filesystem_default_node_type, + .mknod_h = rtems_filesystem_default_mknod, + .chown_h = rtems_filesystem_default_chown, + .freenod_h = rtems_filesystem_default_freenode, + .mount_h = rtems_filesystem_default_mount, + .fsmount_me_h = rtems_filesystem_default_fsmount, + .unmount_h = rtems_filesystem_default_unmount, + .fsunmount_me_h = rtems_filesystem_default_fsunmount, + .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 = rtems_filesystem_default_rename, + .statvfs_h = rtems_filesystem_default_statvfs +}; |