diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-16 13:44:13 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-20 10:31:53 +0100 |
commit | 2f68778f08471fb7f13a8634ebb48c6db13c0f69 (patch) | |
tree | eae0deea88cc0d81052f8497a668dfaeecd6de40 /cpukit/libfs/src/imfs/imfs_handlers_memfile.c | |
parent | libcsupport: Add and use rtems_libio_iovec_eval() (diff) | |
download | rtems-2f68778f08471fb7f13a8634ebb48c6db13c0f69.tar.bz2 |
Filesystem: Add readv/writev handlers
The readv() and writev() support was implemented in terms of multiple
calls to the read and write handlers. This imposes a problem on device
files which use an IO vector as single request entity. For example a
low-level network device (e.g. BPF(4)) may use an IO vector to create
one frame from multiple protocol layers each with its own IO vector
entry.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_handlers_memfile.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_memfile.c b/cpukit/libfs/src/imfs/imfs_handlers_memfile.c index d0c5912eb3..44ed856147 100644 --- a/cpukit/libfs/src/imfs/imfs_handlers_memfile.c +++ b/cpukit/libfs/src/imfs/imfs_handlers_memfile.c @@ -34,17 +34,19 @@ static int IMFS_stat_file( } static const rtems_filesystem_file_handlers_r IMFS_memfile_handlers = { - memfile_open, - rtems_filesystem_default_close, - memfile_read, - memfile_write, - rtems_filesystem_default_ioctl, - rtems_filesystem_default_lseek_file, - IMFS_stat_file, - memfile_ftruncate, - rtems_filesystem_default_fsync_or_fdatasync_success, - rtems_filesystem_default_fsync_or_fdatasync_success, - rtems_filesystem_default_fcntl + .open_h = memfile_open, + .close_h = rtems_filesystem_default_close, + .read_h = memfile_read, + .write_h = memfile_write, + .ioctl_h = rtems_filesystem_default_ioctl, + .lseek_h = rtems_filesystem_default_lseek_file, + .fstat_h = IMFS_stat_file, + .ftruncate_h = memfile_ftruncate, + .fsync_h = rtems_filesystem_default_fsync_or_fdatasync_success, + .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync_success, + .fcntl_h = rtems_filesystem_default_fcntl, + .readv_h = rtems_filesystem_default_readv, + .writev_h = rtems_filesystem_default_writev }; const IMFS_node_control IMFS_node_control_memfile = { |