summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c')
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c
index cf864c7347..7de04038e7 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c
@@ -163,6 +163,9 @@ rtems_rfs_rtems_file_read (rtems_libio_t* iop,
}
}
+ if (read >= 0)
+ iop->offset = pos + read;
+
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return read;
@@ -220,7 +223,6 @@ rtems_rfs_rtems_file_write (rtems_libio_t* iop,
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write append seek", rc);
}
- iop->offset = pos;
}
while (count)
@@ -251,28 +253,15 @@ rtems_rfs_rtems_file_write (rtems_libio_t* iop,
}
}
+ if (write >= 0)
+ iop->offset = pos + write;
+
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
/**
- * This routine processes the ioctl() system call.
- *
- * @note No ioctl()'s are currently supported for RFS files.
- *
- * @param iop
- * @param command
- * @param buffer
- */
-
-static int
-rtems_rfs_rtems_file_ioctl (rtems_libio_t* iop, uint32_t command, void* buffer)
-{
- return 0;
-}
-
-/**
* This routine processes the lseek() system call.
*
* @param iop
@@ -351,7 +340,7 @@ const rtems_filesystem_file_handlers_r rtems_rfs_rtems_file_handlers = {
.close_h = rtems_rfs_rtems_file_close,
.read_h = rtems_rfs_rtems_file_read,
.write_h = rtems_rfs_rtems_file_write,
- .ioctl_h = rtems_rfs_rtems_file_ioctl,
+ .ioctl_h = rtems_filesystem_default_ioctl,
.lseek_h = rtems_rfs_rtems_file_lseek,
.fstat_h = rtems_rfs_rtems_fstat,
.ftruncate_h = rtems_rfs_rtems_file_ftruncate,