summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-07 16:30:37 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-11 13:58:43 +0200
commit30d412469c930fe4150ad2b9a321eea2747ec6f4 (patch)
treed91c4bfaa8e968a6da87ba9b5860502758d4a26f /cpukit/libblock
parentpc386 - Clock driver compiles again plus clean up (diff)
downloadrtems-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/libblock')
-rw-r--r--cpukit/libblock/src/blkdev-imfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libblock/src/blkdev-imfs.c b/cpukit/libblock/src/blkdev-imfs.c
index fe7a80cc2c..86455930f6 100644
--- a/cpukit/libblock/src/blkdev-imfs.c
+++ b/cpukit/libblock/src/blkdev-imfs.c
@@ -206,7 +206,7 @@ static const rtems_filesystem_file_handlers_r rtems_blkdev_imfs_node = {
.read_h = rtems_blkdev_imfs_read,
.write_h = rtems_blkdev_imfs_write,
.ioctl_h = rtems_blkdev_imfs_ioctl,
- .lseek_h = rtems_filesystem_default_lseek_success,
+ .lseek_h = rtems_filesystem_default_lseek_file,
.fstat_h = rtems_blkdev_imfs_fstat,
.ftruncate_h = rtems_filesystem_default_ftruncate,
.fsync_h = rtems_blkdev_imfs_fsync_or_fdatasync,