This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit d7350ee370360e288fd785999e2f36b5426c2a61 Author: Parthiban Nallathambi <[email protected]> AuthorDate: Sat Nov 21 20:45:21 2026 +0530 boards/qemu-rh850-u2c: Mount a tmpfs at /tmp. The NTFC nsh tests create files and directories in /tmp. Mount a tmpfs there in board_late_initialize when CONFIG_FS_TMPFS is enabled, as the other QEMU boards do. Signed-off-by: Parthiban Nallathambi <[email protected]> --- .../u2c/qemu-rh850-u2c/src/qemu_rh850_u2c_boardinit.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/boards/rh850/u2c/qemu-rh850-u2c/src/qemu_rh850_u2c_boardinit.c b/boards/rh850/u2c/qemu-rh850-u2c/src/qemu_rh850_u2c_boardinit.c index 4efe785d9fd..0e867e2e0c6 100644 --- a/boards/rh850/u2c/qemu-rh850-u2c/src/qemu_rh850_u2c_boardinit.c +++ b/boards/rh850/u2c/qemu-rh850-u2c/src/qemu_rh850_u2c_boardinit.c @@ -74,22 +74,32 @@ static void qemu_test_exit(int status, uint32_t zero) * Name: board_late_initialize * * Description: - * Board initialization after the OS is up: mount procfs. + * Board initialization after the OS is up: mount procfs and tmpfs. * ****************************************************************************/ #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#ifdef CONFIG_FS_PROCFS +#if defined(CONFIG_FS_PROCFS) || defined(CONFIG_FS_TMPFS) int ret; +#endif +#ifdef CONFIG_FS_PROCFS ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); if (ret < 0) { syslog(LOG_ERR, "ERROR: Failed to mount procfs: %d\n", ret); } #endif + +#ifdef CONFIG_FS_TMPFS + ret = nx_mount(NULL, CONFIG_LIBC_TMPDIR, "tmpfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount tmpfs: %d\n", ret); + } +#endif } #endif
