Kaben123 opened a new pull request, #19990: URL: https://github.com/apache/nuttx/pull/19990
## Summary Implement link, symlink, readlink, and lstat support for the **hostfs** and **rpmsgfs** filesystem backends, utilizing the mountpt_operations interfaces added in #19949. This is **PR#3** of a 4-part PSE52/POSIX filesystem enhancement series: - ✅ PR#1 — link/mountpt infrastructure (#19949, **merged**) - ✅ PR#2 — inode path-resolution infrastructure (#19950, **merged**) - **PR#3 — filesystem backends (this PR)** - PR#4 — target bug fixes (pending PR#3 merge) ## Changes (4 commits) 1. **fs/hostfs: move global lock into hostfs_mountpt_s** — Replace the global `g_lock` with a per-filesystem `fs->fs_lock`, improving concurrency for multi-mount scenarios. 2. **fs/hostfs: change fs_heap to lib_tempbuffer** — Migrate hostfs path buffer allocation from fs_heap/stack arrays to the `lib_get_tempbuffer`/`lib_put_tempbuffer` system, aligning with the inode layer (merged in #19950). 3. **fs/hostfs: add link, symlink, readlink and lstat support** — Implement the four operations for hostfs, including arch host stubs for sim/arm/arm64/risc-v/xtensa. Adds the necessary `nuttx_host_link`, `nuttx_host_symlink`, `nuttx_host_readlink`, and `nuttx_host_lstat` host-side functions. 4. **fs/rpmsgfs: add link, symlink, readlink and lstat support** — Implement the four operations for rpmsgfs, adding the corresponding client RPC handlers and server-side dispatch. ## Testing - `sim:nsh` with `CONFIG_FS_HOSTFS=y` + `CONFIG_FS_LINKS=y`: builds cleanly, zero errors, zero warnings. ## Impact - 14 files changed, +1155/−129 lines - No breaking changes — new operations are added at the end of the ops table with NULL placeholders in unaffected filesystems -- 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]
