diff options
author | Chris Johns <chrisj@rtems.org> | 2009-04-29 08:31:27 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2009-04-29 08:31:27 +0000 |
commit | 07d6fd513f1c4d3c6905c880948671de1181fac2 (patch) | |
tree | 4dabf3fdd0b056bba7b0e9beb40f01277e5c2776 /cpukit/libfs/src/imfs | |
parent | 2009-04-28 Chris Johns <chrisj@rtems.org> (diff) | |
download | rtems-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/libfs/src/imfs')
-rw-r--r-- | cpukit/libfs/src/imfs/deviceio.c | 10 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs.h | 28 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_directory.c | 4 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_fifo.c | 6 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/memfile.c | 6 |
5 files changed, 28 insertions, 26 deletions
diff --git a/cpukit/libfs/src/imfs/deviceio.c b/cpukit/libfs/src/imfs/deviceio.c index 62b1381233..70cb936425 100644 --- a/cpukit/libfs/src/imfs/deviceio.c +++ b/cpukit/libfs/src/imfs/deviceio.c @@ -206,12 +206,14 @@ int device_ioctl( /* * device_lseek * - * This handler eats all lseek() operations. + * This handler eats all lseek() operations and does not create + * an error. It assumes all devices can handle the seek. The + * writes fail. */ -off_t device_lseek( +rtems_off64_t device_lseek( rtems_libio_t *iop, - off_t offset, + rtems_off64_t offset, int whence ) { @@ -232,7 +234,7 @@ off_t device_lseek( int device_ftruncate( rtems_libio_t *iop, - off_t length + rtems_off64_t length ) { return 0; diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h index 808a6f0cb7..355e494248 100644 --- a/cpukit/libfs/src/imfs/imfs.h +++ b/cpukit/libfs/src/imfs/imfs.h @@ -98,15 +98,15 @@ typedef uint8_t *block_p; typedef block_p *block_ptr; typedef struct { - off_t size; /* size of file in bytes */ - block_ptr indirect; /* array of 128 data blocks pointers */ - block_ptr doubly_indirect; /* 128 indirect blocks */ - block_ptr triply_indirect; /* 128 doubly indirect blocks */ + rtems_off64_t size; /* size of file in bytes */ + block_ptr indirect; /* array of 128 data blocks pointers */ + block_ptr doubly_indirect; /* 128 indirect blocks */ + block_ptr triply_indirect; /* 128 doubly indirect blocks */ } IMFS_memfile_t; typedef struct { - off_t size; /* size of file in bytes */ - block_p direct; /* pointer to file image */ + rtems_off64_t size; /* size of file in bytes */ + block_p direct; /* pointer to file image */ } IMFS_linearfile_t; /* @@ -380,7 +380,7 @@ extern int IMFS_memfile_remove( extern int memfile_ftruncate( rtems_libio_t *iop, /* IN */ - off_t length /* IN */ + rtems_off64_t length /* IN */ ); extern int imfs_dir_open( @@ -400,9 +400,9 @@ extern ssize_t imfs_dir_read( size_t count /* IN */ ); -extern off_t imfs_dir_lseek( +extern rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, /* IN */ - off_t offset, /* IN */ + rtems_off64_t offset, /* IN */ int whence /* IN */ ); @@ -444,9 +444,9 @@ extern int memfile_ioctl( void *buffer /* IN */ ); -extern off_t memfile_lseek( +extern rtems_off64_t memfile_lseek( rtems_libio_t *iop, /* IN */ - off_t offset, /* IN */ + rtems_off64_t offset, /* IN */ int whence /* IN */ ); @@ -483,15 +483,15 @@ extern int device_ioctl( void *buffer /* IN */ ); -extern off_t device_lseek( +extern rtems_off64_t device_lseek( rtems_libio_t *iop, /* IN */ - off_t offset, /* IN */ + rtems_off64_t offset, /* IN */ int whence /* IN */ ); extern int device_ftruncate( rtems_libio_t *iop, /* IN */ - off_t length /* IN */ + rtems_off64_t length /* IN */ ); extern int IMFS_utime( diff --git a/cpukit/libfs/src/imfs/imfs_directory.c b/cpukit/libfs/src/imfs/imfs_directory.c index 519d534fe0..1107da9221 100644 --- a/cpukit/libfs/src/imfs/imfs_directory.c +++ b/cpukit/libfs/src/imfs/imfs_directory.c @@ -182,9 +182,9 @@ int imfs_dir_close( * SEEK_END - N/A --> This will cause an assert. */ -off_t imfs_dir_lseek( +rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, - off_t offset, + rtems_off64_t offset, int whence ) { diff --git a/cpukit/libfs/src/imfs/imfs_fifo.c b/cpukit/libfs/src/imfs/imfs_fifo.c index 5d3cf466c6..f02cfd31c6 100644 --- a/cpukit/libfs/src/imfs/imfs_fifo.c +++ b/cpukit/libfs/src/imfs/imfs_fifo.c @@ -119,10 +119,10 @@ int IMFS_fifo_ioctl( IMFS_FIFO_RETURN(err); } -off_t IMFS_fifo_lseek( +rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, - off_t offset, - int whence + rtems_off64_t offset, + int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c index 51ad8669bb..e9b4d70f97 100644 --- a/cpukit/libfs/src/imfs/memfile.c +++ b/cpukit/libfs/src/imfs/memfile.c @@ -214,9 +214,9 @@ int memfile_ioctl( * This routine processes the lseek() system call. */ -off_t memfile_lseek( +rtems_off64_t memfile_lseek( rtems_libio_t *iop, - off_t offset, + rtems_off64_t offset, int whence ) { @@ -251,7 +251,7 @@ off_t memfile_lseek( int memfile_ftruncate( rtems_libio_t *iop, - off_t length + rtems_off64_t length ) { IMFS_jnode_t *the_jnode; |