2009-03-09 Joel Sherrill <joel.sherrill@OARcorp.com>

PR 1376/filesystem
	* libcsupport/include/rtems/libio.h, libfs/src/dosfs/fat_file.c,
	libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_dir.c,
	libfs/src/dosfs/msdos_file.c, libfs/src/imfs/deviceio.c,
	libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_directory.c,
	libfs/src/imfs/memfile.c, libfs/src/nfsclient/src/nfs.c: lseek
	handlers should return off_t.
This commit is contained in:
Joel Sherrill
2009-03-09 14:12:58 +00:00
parent c933a3d6b9
commit 64504e971d
11 changed files with 25 additions and 15 deletions

View File

@@ -1,3 +1,13 @@
2009-03-09 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1376/filesystem
* libcsupport/include/rtems/libio.h, libfs/src/dosfs/fat_file.c,
libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_dir.c,
libfs/src/dosfs/msdos_file.c, libfs/src/imfs/deviceio.c,
libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_directory.c,
libfs/src/imfs/memfile.c, libfs/src/nfsclient/src/nfs.c: lseek
handlers should return off_t.
2009-03-02 Joel Sherrill <joel.sherrill@OARcorp.com> 2009-03-02 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1388/cpukit PR 1388/cpukit

View File

@@ -83,7 +83,7 @@ typedef int (*rtems_filesystem_ioctl_t)(
void *buffer void *buffer
); );
typedef int (*rtems_filesystem_lseek_t)( typedef off_t (*rtems_filesystem_lseek_t)(
rtems_libio_t *iop, rtems_libio_t *iop,
off_t length, off_t length,
int whence int whence

View File

@@ -49,7 +49,7 @@ _hash_search(
fat_file_fd_t **ret fat_file_fd_t **ret
); );
static int static off_t
fat_file_lseek( fat_file_lseek(
rtems_filesystem_mount_table_entry_t *mt_entry, rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd, fat_file_fd_t *fat_fd,
@@ -940,7 +940,7 @@ _hash_search(
return -1; return -1;
} }
static int static off_t
fat_file_lseek( fat_file_lseek(
rtems_filesystem_mount_table_entry_t *mt_entry, rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd, fat_file_fd_t *fat_fd,

View File

@@ -258,7 +258,7 @@ ssize_t msdos_file_write(
size_t count /* IN */ size_t count /* IN */
); );
int msdos_file_lseek( off_t msdos_file_lseek(
rtems_libio_t *iop, /* IN */ rtems_libio_t *iop, /* IN */
off_t offset, /* IN */ off_t offset, /* IN */
int whence /* IN */ int whence /* IN */
@@ -308,7 +308,7 @@ ssize_t msdos_dir_read(
size_t count /* IN */ size_t count /* IN */
); );
int msdos_dir_lseek( off_t msdos_dir_lseek(
rtems_libio_t *iop, /* IN */ rtems_libio_t *iop, /* IN */
off_t offset, /* IN */ off_t offset, /* IN */
int whence /* IN */ int whence /* IN */

View File

@@ -363,7 +363,7 @@ msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
* RC_OK on success, or -1 if error occured (errno * RC_OK on success, or -1 if error occured (errno
* set apropriately). * set apropriately).
*/ */
int off_t
msdos_dir_lseek(rtems_libio_t *iop, off_t offset, int whence) msdos_dir_lseek(rtems_libio_t *iop, off_t offset, int whence)
{ {
switch (whence) switch (whence)

View File

@@ -223,7 +223,7 @@ msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
* new offset on success, or -1 if error occured (errno set * new offset on success, or -1 if error occured (errno set
* appropriately). * appropriately).
*/ */
int off_t
msdos_file_lseek(rtems_libio_t *iop, off_t offset, int whence) msdos_file_lseek(rtems_libio_t *iop, off_t offset, int whence)
{ {
int rc = RC_OK; int rc = RC_OK;

View File

@@ -235,7 +235,7 @@ int device_ioctl(
* This handler eats all lseek() operations. * This handler eats all lseek() operations.
*/ */
int device_lseek( off_t device_lseek(
rtems_libio_t *iop, rtems_libio_t *iop,
off_t offset, off_t offset,
int whence int whence

View File

@@ -391,7 +391,7 @@ ssize_t imfs_dir_read(
size_t count /* IN */ size_t count /* IN */
); );
int imfs_dir_lseek( off_t imfs_dir_lseek(
rtems_libio_t *iop, /* IN */ rtems_libio_t *iop, /* IN */
off_t offset, /* IN */ off_t offset, /* IN */
int whence /* IN */ int whence /* IN */
@@ -435,7 +435,7 @@ int memfile_ioctl(
void *buffer /* IN */ void *buffer /* IN */
); );
int memfile_lseek( off_t memfile_lseek(
rtems_libio_t *iop, /* IN */ rtems_libio_t *iop, /* IN */
off_t offset, /* IN */ off_t offset, /* IN */
int whence /* IN */ int whence /* IN */
@@ -474,7 +474,7 @@ int device_ioctl(
void *buffer /* IN */ void *buffer /* IN */
); );
int device_lseek( off_t device_lseek(
rtems_libio_t *iop, /* IN */ rtems_libio_t *iop, /* IN */
off_t offset, /* IN */ off_t offset, /* IN */
int whence /* IN */ int whence /* IN */

View File

@@ -182,7 +182,7 @@ int imfs_dir_close(
* SEEK_END - N/A --> This will cause an assert. * SEEK_END - N/A --> This will cause an assert.
*/ */
int imfs_dir_lseek( off_t imfs_dir_lseek(
rtems_libio_t *iop, rtems_libio_t *iop,
off_t offset, off_t offset,
int whence int whence

View File

@@ -214,7 +214,7 @@ int memfile_ioctl(
* This routine processes the lseek() system call. * This routine processes the lseek() system call.
*/ */
int memfile_lseek( off_t memfile_lseek(
rtems_libio_t *iop, rtems_libio_t *iop,
off_t offset, off_t offset,
int whence int whence

View File

@@ -2747,7 +2747,7 @@ static int nfs_file_ioctl(
#define nfs_link_ioctl 0 #define nfs_link_ioctl 0
#endif #endif
static int nfs_file_lseek( static off_t nfs_file_lseek(
rtems_libio_t *iop, rtems_libio_t *iop,
off_t length, off_t length,
int whence int whence
@@ -2780,7 +2780,7 @@ static int nfs_file_lseek(
return iop->offset; return iop->offset;
} }
static int nfs_dir_lseek( static off_t nfs_dir_lseek(
rtems_libio_t *iop, rtems_libio_t *iop,
off_t length, off_t length,
int whence int whence