mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 10:32:47 +08:00
fs/cromfs and tools/gencromfs: Various fixes for traversal relative file paths. Biggest changes is in types used: Cannot use size_t or mode_t in common structures because they have different sizes on the (64-bit) host and the (32-bit) target. Use uint32_t instead of size_t for offsets. Use uint16_t instead of mode_t.
This commit is contained in:
@@ -108,8 +108,8 @@ struct fs_romfsdir_s
|
||||
|
||||
struct fs_cromfsdir_s
|
||||
{
|
||||
off_t cr_firstoffset; /* Offset to the first entry in the directory */
|
||||
off_t cr_curroffset; /* Current offset into the directory contents */
|
||||
uint32_t cr_firstoffset; /* Offset to the first entry in the directory */
|
||||
uint32_t cr_curroffset; /* Current offset into the directory contents */
|
||||
};
|
||||
#endif /* CONFIG_FS_CROMFS */
|
||||
|
||||
|
||||
+7
-7
@@ -111,20 +111,20 @@
|
||||
|
||||
/* Floating point types */
|
||||
|
||||
typedef float float32;
|
||||
typedef float float32;
|
||||
#ifndef CONFIG_HAVE_DOUBLE
|
||||
typedef float double_t;
|
||||
typedef float float64;
|
||||
typedef float double_t;
|
||||
typedef float float64;
|
||||
#else
|
||||
typedef double double_t;
|
||||
typedef double float64;
|
||||
typedef double double_t;
|
||||
typedef double float64;
|
||||
#endif
|
||||
|
||||
/* Misc. scalar types */
|
||||
|
||||
/* mode_t is an integer type used for file attributes. mode_t needs
|
||||
* to be at least 16-bits but, in fact must be sizeof(int) because it is
|
||||
* pased via varargs.
|
||||
* to be at least 16-bits but, in fact, must be sizeof(int) because it is
|
||||
* passed via varargs.
|
||||
*/
|
||||
|
||||
typedef unsigned int mode_t;
|
||||
|
||||
Reference in New Issue
Block a user