forked from Imagelibrary/rtems
2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>
PR1945/cpukit * libfs/src/nfsclient/src/nfs.c, libfs/src/rfs/rtems-rfs-rtems-dev.c, libfs/src/rfs/rtems-rfs-rtems-dir.c, libfs/src/rfs/rtems-rfs-rtems-file.c, libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c: Replace rtems_off64_t with off_t.
This commit is contained in:
@@ -12,6 +12,10 @@
|
|||||||
* libfs/src/imfs/deviceio.c, libfs/src/imfs/imfs.h,
|
* libfs/src/imfs/deviceio.c, libfs/src/imfs/imfs.h,
|
||||||
libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_fifo.c,
|
libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_fifo.c,
|
||||||
libfs/src/imfs/memfile.c: Replace rtems_off64_t with off_t.
|
libfs/src/imfs/memfile.c: Replace rtems_off64_t with off_t.
|
||||||
|
* libfs/src/nfsclient/src/nfs.c, libfs/src/rfs/rtems-rfs-rtems-dev.c,
|
||||||
|
libfs/src/rfs/rtems-rfs-rtems-dir.c,
|
||||||
|
libfs/src/rfs/rtems-rfs-rtems-file.c, libnetworking/lib/ftpfs.c,
|
||||||
|
libnetworking/lib/tftpDriver.c: Replace rtems_off64_t with off_t.
|
||||||
|
|
||||||
2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>
|
2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
|||||||
@@ -2688,9 +2688,9 @@ int e;
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static rtems_off64_t nfs_file_lseek(
|
static off_t nfs_file_lseek(
|
||||||
rtems_libio_t *iop,
|
rtems_libio_t *iop,
|
||||||
rtems_off64_t length,
|
off_t length,
|
||||||
int whence
|
int whence
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -2721,9 +2721,9 @@ static rtems_off64_t nfs_file_lseek(
|
|||||||
return iop->offset;
|
return iop->offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static rtems_off64_t nfs_dir_lseek(
|
static off_t nfs_dir_lseek(
|
||||||
rtems_libio_t *iop,
|
rtems_libio_t *iop,
|
||||||
rtems_off64_t length,
|
off_t length,
|
||||||
int whence
|
int whence
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -2774,7 +2774,7 @@ struct stat
|
|||||||
uid_t st_uid;
|
uid_t st_uid;
|
||||||
gid_t st_gid;
|
gid_t st_gid;
|
||||||
dev_t st_rdev;
|
dev_t st_rdev;
|
||||||
rtems_off64_t st_size;
|
off_t st_size;
|
||||||
/* SysV/sco doesn't have the rest... But Solaris, eabi does. */
|
/* SysV/sco doesn't have the rest... But Solaris, eabi does. */
|
||||||
#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
|
#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
|
||||||
time_t st_atime;
|
time_t st_atime;
|
||||||
@@ -2958,7 +2958,7 @@ sattr arg;
|
|||||||
*/
|
*/
|
||||||
static int nfs_file_ftruncate(
|
static int nfs_file_ftruncate(
|
||||||
rtems_libio_t *iop,
|
rtems_libio_t *iop,
|
||||||
rtems_off64_t length
|
off_t length
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
sattr arg;
|
sattr arg;
|
||||||
|
|||||||
@@ -224,12 +224,12 @@ rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
|
|||||||
* @param iop
|
* @param iop
|
||||||
* @param offset
|
* @param offset
|
||||||
* @param whence
|
* @param whence
|
||||||
* @return rtems_off64_t
|
* @return off_t
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static rtems_off64_t
|
static off_t
|
||||||
rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
|
rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
|
||||||
rtems_off64_t offset,
|
off_t offset,
|
||||||
int whence)
|
int whence)
|
||||||
{
|
{
|
||||||
return offset;
|
return offset;
|
||||||
@@ -244,7 +244,7 @@ rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, rtems_off64_t length)
|
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, off_t length)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,11 +171,11 @@ rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
|
|||||||
* @param iop
|
* @param iop
|
||||||
* @param offset
|
* @param offset
|
||||||
* @param whence
|
* @param whence
|
||||||
* return rtems_off64_t
|
* return off_t
|
||||||
*/
|
*/
|
||||||
static rtems_off64_t
|
static off_t
|
||||||
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
|
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
|
||||||
rtems_off64_t offset,
|
off_t offset,
|
||||||
int whence)
|
int whence)
|
||||||
{
|
{
|
||||||
switch (whence)
|
switch (whence)
|
||||||
|
|||||||
@@ -24,6 +24,14 @@
|
|||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#if SIZEOF_OFF_T == 8
|
||||||
|
#define PRIdoff_t PRId64
|
||||||
|
#elif SIZEOF_OFF_T == 4
|
||||||
|
#define PRIdoff_t PRId32
|
||||||
|
#else
|
||||||
|
#error "unsupported size of off_t"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <rtems/rfs/rtems-rfs-file.h>
|
#include <rtems/rfs/rtems-rfs-file.h>
|
||||||
#include "rtems-rfs-rtems.h"
|
#include "rtems-rfs-rtems.h"
|
||||||
|
|
||||||
@@ -272,11 +280,11 @@ rtems_rfs_rtems_file_ioctl (rtems_libio_t* iop, uint32_t command, void* buffer)
|
|||||||
* @param iop
|
* @param iop
|
||||||
* @param offset
|
* @param offset
|
||||||
* @param whence
|
* @param whence
|
||||||
* @return rtems_off64_t
|
* @return off_t
|
||||||
*/
|
*/
|
||||||
static rtems_off64_t
|
static off_t
|
||||||
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
|
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
|
||||||
rtems_off64_t offset,
|
off_t offset,
|
||||||
int whence)
|
int whence)
|
||||||
{
|
{
|
||||||
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
|
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
|
||||||
@@ -284,7 +292,7 @@ rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
|
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
|
||||||
printf("rtems-rfs: file-lseek: handle:%p offset:%Ld\n", file, offset);
|
printf("rtems-rfs: file-lseek: handle:%p offset:%" PRIdoff_t "\n", file, offset);
|
||||||
|
|
||||||
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
|
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
|
||||||
|
|
||||||
@@ -311,13 +319,13 @@ rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
|
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
|
||||||
rtems_off64_t length)
|
off_t length)
|
||||||
{
|
{
|
||||||
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
|
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
|
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_FTRUNC))
|
||||||
printf("rtems-rfs: file-ftrunc: handle:%p length:%Ld\n", file, length);
|
printf("rtems-rfs: file-ftrunc: handle:%p length:%" PRIdoff_t "\n", file, length);
|
||||||
|
|
||||||
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
|
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
|
||||||
|
|
||||||
|
|||||||
@@ -1149,7 +1149,7 @@ static int rtems_ftpfs_close(rtems_libio_t *iop)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Dummy version to let fopen(*,"w") work properly */
|
/* Dummy version to let fopen(*,"w") work properly */
|
||||||
static int rtems_ftpfs_ftruncate(rtems_libio_t *iop, rtems_off64_t count)
|
static int rtems_ftpfs_ftruncate(rtems_libio_t *iop, off_t count)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1046,7 +1046,7 @@ static ssize_t rtems_tftp_write(
|
|||||||
*/
|
*/
|
||||||
static int rtems_tftp_ftruncate(
|
static int rtems_tftp_ftruncate(
|
||||||
rtems_libio_t *iop __attribute__((unused)),
|
rtems_libio_t *iop __attribute__((unused)),
|
||||||
rtems_off64_t count __attribute__((unused))
|
off_t count __attribute__((unused))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user