Fix AVR warnings; FAT FS needs to use off_t instead of size_t

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3728 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-06-20 20:54:45 +00:00
parent a06d4256e4
commit 37b42d4259
13 changed files with 79 additions and 68 deletions
+6 -6
View File
@@ -108,13 +108,13 @@
struct statfs
{
uint32_t f_type; /* Type of filesystem (see definitions above) */
size_t f_namelen; /* Maximum length of filenames */
size_t f_bsize; /* Optimal block size for transfers */
size_t f_blocks; /* Total data blocks in the file system of this size */
size_t f_bfree; /* Free blocks in the file system */
size_t f_bavail; /* Free blocks avail to non-superuser */
size_t f_files; /* Total file nodes in the file system */
size_t f_ffree; /* Free file nodes in the file system */
uint32_t f_namelen; /* Maximum length of filenames */
off_t f_blocks; /* Total data blocks in the file system of this size */
off_t f_bfree; /* Free blocks in the file system */
off_t f_bavail; /* Free blocks avail to non-superuser */
off_t f_files; /* Total file nodes in the file system */
off_t f_ffree; /* Free file nodes in the file system */
};
/****************************************************************************
+11 -3
View File
@@ -121,7 +121,7 @@ typedef double float64;
typedef unsigned int mode_t;
/* size_t is used for sizes of objects.
/* size_t is used for sizes of memory objects.
* ssize_t is used for a count of bytes or an error indication.
*/
@@ -161,15 +161,23 @@ typedef unsigned int id_t;
/* blkcnt_t and off_t are signed integer types.
*
* blkcnt_t is used for file block counts.
* off_t is used for file sizes.
* off_t is used for file offsets and sizes.
* fpos_t is used for file positions.
*
* Hence, both should be independent of processor architecture.
* Hence, all should be independent of processor architecture.
*/
typedef uint32_t blkcnt_t;
typedef int32_t off_t;
typedef off_t fpos_t;
/* Large file versions */
#ifdef CONFIG_HAVE_LONG_LONG
typedef int64_t off64_t;
typedef int64_t fpos64_t;
#endif
/* blksize_t is a signed integer value used for file block sizes */
typedef int16_t blksize_t;