summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems/libio.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2009-04-29 08:31:27 +0000
committerChris Johns <chrisj@rtems.org>2009-04-29 08:31:27 +0000
commit07d6fd513f1c4d3c6905c880948671de1181fac2 (patch)
tree4dabf3fdd0b056bba7b0e9beb40f01277e5c2776 /cpukit/libcsupport/include/rtems/libio.h
parent2009-04-28 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-07d6fd513f1c4d3c6905c880948671de1181fac2.tar.bz2
2009-04-29 Chris Johns <chrisj@rtems.org>
* libcsupport/include/rtems/libio.h: Add rtems_off64_t for internal use. Update the internal off_t to the 64bit offset. * libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c, libfs/src/nfsclient/src/nfs.c, libfs/src/imfs/imfs_fifo.c, libfs/src/imfs/memfile.c, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs.h, libfs/src/imfs/deviceio.c: Change off_t to rtems_off64_t. * libmisc/shell/main_msdosfmt.c: Add an info level so the format code can tell the user what is happening. Add more options to control the format configuration. * libfs/src/dosfs/msdos_format.c: Add a print function to display the format progress and print statements. Select a better default cluster size depending on the size of the disk. This lowers the size of the FAT on large disks. Read and maintain the MRB partition information. * libfs/src/dosfs/dosfs.h, libfs/src/dosfs/fat.h, libfs/src/dosfs/fat_file.c, libfs/src/dosfs/fat_file.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_conv.c, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_file.c, libfs/src/dosfs/msdos_handlers_dir.c, libfs/src/dosfs/msdos_handlers_file.c, libfs/src/dosfs/msdos_init.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_misc.c, libfs/src/dosfs/msdos_mknod.c: Add long file name support. Change off_t to rtems_off64_t.
Diffstat (limited to 'cpukit/libcsupport/include/rtems/libio.h')
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 83872b760a..5f840647db 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -40,6 +40,11 @@ extern "C" {
#endif
/*
+ * A 64bit file offset for internal use by RTEMS. Based on the newlib type.
+ */
+typedef _off64_t rtems_off64_t;
+
+/*
* Valid RTEMS file types.
*/
@@ -83,9 +88,9 @@ typedef int (*rtems_filesystem_ioctl_t)(
void *buffer
);
-typedef off_t (*rtems_filesystem_lseek_t)(
+typedef rtems_off64_t (*rtems_filesystem_lseek_t)(
rtems_libio_t *iop,
- off_t length,
+ rtems_off64_t length,
int whence
);
@@ -101,7 +106,7 @@ typedef int (*rtems_filesystem_fchmod_t)(
typedef int (*rtems_filesystem_ftruncate_t)(
rtems_libio_t *iop,
- off_t length
+ rtems_off64_t length
);
typedef int (*rtems_filesystem_fpathconf_t)(
@@ -347,8 +352,8 @@ typedef enum
struct rtems_libio_tt {
rtems_driver_name_t *driver;
- off_t size; /* size of file */
- off_t offset; /* current offset into file */
+ rtems_off64_t size; /* size of file */
+ rtems_off64_t offset; /* current offset into file */
uint32_t flags;
rtems_filesystem_location_info_t pathinfo;
rtems_id sem;
@@ -366,7 +371,7 @@ struct rtems_libio_tt {
typedef struct {
rtems_libio_t *iop;
- off_t offset;
+ rtems_off64_t offset;
char *buffer;
uint32_t count;
uint32_t flags;
@@ -441,10 +446,10 @@ typedef int (*rtems_libio_ioctl_t)(
void *buffer
);
-typedef int (*rtems_libio_lseek_t)(
- int fd,
- off_t offset,
- int whence
+typedef rtems_off64_t (*rtems_libio_lseek_t)(
+ int fd,
+ rtems_off64_t offset,
+ int whence
);
/*