xiaoxiang781216 opened a new pull request, #19179:
URL: https://github.com/apache/nuttx/pull/19179
## Summary
This series widens NuttX's inode/uid integer types and adds the POSIX
`d_ino` member to `struct dirent`, so portable software (e.g. dropbear's
`scp`) that relies on a meaningful, wide file serial number works correctly.
* **sys/types: always use unsigned int for uid_t/gid_t** — move
`uid_t`/`gid_t` out of the `CONFIG_SMALL_MEMORY` `#ifdef` so they are
always `unsigned int`; keep `include/nuttx/fs/hostfs.h` in sync (drop the
`int16_t` variants of `nuttx_gid_t`/`nuttx_uid_t`).
* **fs: widen ino_t from uint16_t to uint32_t** — a 16-bit `ino_t` only
addresses 65536 file serial numbers, which breaks large directory trees
and portable callers. Widen `ino_t` (and `nuttx_ino_t` in the hostfs ABI)
to `uint32_t`. Adjust `fs/rpmsgfs/rpmsgfs.h` so the packed
`rpmsgfs_stat_priv_s` layout/size stays unchanged.
* **fs/dir: reuse close_mountpoint/close_pseudodir helpers in dir_close** —
`dir_close()` open-coded the same cleanup that `closedir()` already does
via the helpers; share the logic so future fixes live in one place.
* **fs/dirent: add d_ino member to struct dirent** — declare `d_ino` and
populate it on every `readdir()` path (pseudofs, hostfs/sim, yaffs,
rpmsgfs), so callers observe a non-zero inode number.
## Impact
* Adds the POSIX `d_ino` field to `struct dirent` (was previously absent).
* `ino_t` widened from 16-bit to 32-bit; `uid_t`/`gid_t` are now always
`unsigned int` regardless of `CONFIG_SMALL_MEMORY`.
* hostfs RPC ABI (`struct nuttx_dirent_s`, `nuttx_ino_t`,
`nuttx_uid_t`/`nuttx_gid_t`) updated to match; rpmsgfs packed struct size
preserved.
* No new configuration options; no defconfig changes.
## Testing
* `tools/checkpatch.sh -g apache/master..HEAD` — all checks pass.
* Built and ran `sim:nsh`; verified `readdir()`/`ls` reports non-zero
`d_ino` values and hostfs/rpmsgfs paths propagate the inode number.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]