diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-05-07 16:30:37 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-05-11 13:58:43 +0200 |
commit | 30d412469c930fe4150ad2b9a321eea2747ec6f4 (patch) | |
tree | d91c4bfaa8e968a6da87ba9b5860502758d4a26f /cpukit/libfs/src/devfs/devfs_init.c | |
parent | pc386 - Clock driver compiles again plus clean up (diff) | |
download | rtems-30d412469c930fe4150ad2b9a321eea2747ec6f4.tar.bz2 |
Filesystem: PR1398: Fix lseek() mechanic
According to POSIX the lseek() function shall not, by itself, extend the
size of a file.
Remove the size field of rtems_libio_t. A file has only one size but
may have multiple open file descriptors. Thus a file size field in the
file descriptor may lead to inconsistencies.
New default handlers rtems_filesystem_default_lseek_file() and
rtems_filesystem_default_lseek_directory().
Diffstat (limited to 'cpukit/libfs/src/devfs/devfs_init.c')
-rw-r--r-- | cpukit/libfs/src/devfs/devfs_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libfs/src/devfs/devfs_init.c b/cpukit/libfs/src/devfs/devfs_init.c index db856d21fa..154f1b9176 100644 --- a/cpukit/libfs/src/devfs/devfs_init.c +++ b/cpukit/libfs/src/devfs/devfs_init.c @@ -42,7 +42,7 @@ const rtems_filesystem_file_handlers_r devFS_file_handlers = { .read_h = devFS_read, .write_h = devFS_write, .ioctl_h = devFS_ioctl, - .lseek_h = rtems_filesystem_default_lseek, + .lseek_h = rtems_filesystem_default_lseek_file, .fstat_h = devFS_stat, .ftruncate_h = rtems_filesystem_default_ftruncate, .fsync_h = rtems_filesystem_default_fsync_or_fdatasync, |