mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
fs: widen ino_t from uint16_t to uint32_t
A 16-bit ino_t can only address 65536 distinct file serial numbers, which is not enough for filesystems with large directory trees and breaks portable software (e.g. dropbear's scp) that expects a wider inode number space. Widen ino_t (and nuttx_ino_t in the hostfs ABI) to uint32_t to match common POSIX practice. Update fs/rpmsgfs/rpmsgfs.h accordingly: promote the 'ino' field in struct rpmsgfs_stat_priv_s from uint16_t to uint32_t and move 'nlink' into the trailing 16-bit slot previously occupied by the reserved field, keeping the overall packed-struct layout/size unchanged. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
fa61c78c78
commit
50377d0909
3 changed files with 4 additions and 5 deletions
|
|
@ -122,7 +122,7 @@ typedef intptr_t nuttx_ssize_t;
|
|||
typedef unsigned int nuttx_gid_t;
|
||||
typedef unsigned int nuttx_uid_t;
|
||||
typedef uint32_t nuttx_dev_t;
|
||||
typedef uint16_t nuttx_ino_t;
|
||||
typedef uint32_t nuttx_ino_t;
|
||||
typedef uint16_t nuttx_nlink_t;
|
||||
|
||||
# ifdef CONFIG_FS_LARGEFILE
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ typedef uint32_t dev_t;
|
|||
|
||||
/* ino_t is used for file serial numbers */
|
||||
|
||||
typedef uint16_t ino_t;
|
||||
typedef uint32_t ino_t;
|
||||
|
||||
/* nlink_t is used for link counts */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue