casaroli opened a new pull request, #21652: URL: https://github.com/apache/nuttx/pull/21652
## Summary `FS_PROCFS` can be enabled together with `DISABLE_MOUNTPOINT`. fs/Makefile and fs/procfs/CMakeLists.txt do not build procfs when mount points are disabled, and `nx_mount()` is not declared then, but `CONFIG_FS_PROCFS` stays set. Code that tests only `CONFIG_FS_PROCFS` then fails to build. For example, qemu-armv8a:nsh with `DISABLE_MOUNTPOINT=y` stops in qemu_bringup.c: ``` qemu_bringup.c:166:9: error: implicit declaration of function 'nx_mount' [-Wimplicit-function-declaration] ``` This PR adds `depends on !DISABLE_MOUNTPOINT` to `FS_PROCFS`, as the other mountable file systems (tmpfs, romfs, fat, v9fs, littlefs, hostfs, ...) already have. ## Impact - A configuration with `DISABLE_MOUNTPOINT=y` now gets `FS_PROCFS` off, and the options that depend on it (`FS_PROCFS_REGISTER`, the procfs entries, `NSH_PROC_MOUNTPOINT`, ...) are off too. Before, procfs was not built in such a configuration anyway, so no feature is lost. - The fix is in Kconfig, so it covers every board: 220 of the 240 board files that mount procfs test only `CONFIG_FS_PROCFS`. A guard in each bringup file is not necessary. - No defconfig sets both `DISABLE_MOUNTPOINT` and `FS_PROCFS` (git grep of boards/), so no defconfig changes. Configurations without `DISABLE_MOUNTPOINT` do not change: the qemu-armv8a:nsh `.config` is the same before and after. - Kconfig only: the same for flat, protected and kernel builds and for every architecture. No code size change. - Documentation/: the procfs page does not list Kconfig dependencies, so there is no documentation change. ## Testing qemu-armv8a:nsh, `EXTRAFLAGS="-Wno-cpp -Werror"`, aarch64-none-elf-gcc 14.2, master 80a052ff9cc vs this PR: | Configuration | master | this PR | |---|---|---| | qemu-armv8a:nsh + `DISABLE_MOUNTPOINT=y` | build fails (qemu_bringup.c:166, implicit `nx_mount()`) | builds, no warnings; `FS_PROCFS` is off | | qemu-armv8a:nsh (default) | `FS_PROCFS=y` | the same `.config` as master | With `DISABLE_MOUNTPOINT=y` the `.config` of this PR differs from master only in the options that depend on `FS_PROCFS` (`FS_PROCFS`, `FS_PROCFS_REGISTER`, the procfs entries, `SCHED_IRQMONITOR`, `SYSTEM_STACKMONITOR`, `NSH_PROC_MOUNTPOINT` and the NSH commands that need procfs). `tools/refresh.sh --silent qemu-armv8a:nsh` leaves the defconfig unchanged. `tools/checkpatch.sh -c -u -m -g origin/master..HEAD` passes. -- 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]
