This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit bf0848dbd61ccf5837beca76bf0df99a7d6b23c3
Author: Arjav Patel <[email protected]>
AuthorDate: Thu Apr 23 07:33:37 2026 +0530

    boards/sim: Prefer tmpfs for /tmp in rc.sysinit.
    
    Prefer mounting /tmp with tmpfs in the SIM default rc.sysinit when
    CONFIG_FS_TMPFS is enabled, and keep the FAT RAMDISK path as a
    fallback for configurations that only enable CONFIG_FS_FAT.
    
    Signed-off-by: Arjav Patel <[email protected]>
---
 boards/sim/sim/sim/src/etc/init.d/rc.sysinit | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/boards/sim/sim/sim/src/etc/init.d/rc.sysinit 
b/boards/sim/sim/sim/src/etc/init.d/rc.sysinit
index d1b409a7a62..659eb12f307 100644
--- a/boards/sim/sim/sim/src/etc/init.d/rc.sysinit
+++ b/boards/sim/sim/sim/src/etc/init.d/rc.sysinit
@@ -26,13 +26,19 @@
 #define CONCAT(x, y)  CONCAT_(x, y)
 
 #ifdef CONFIG_ETC_ROMFS
-#ifdef CONFIG_FS_FAT
+#ifdef CONFIG_FS_TMPFS
 
-/* Create a RAMDISK and mount it at /tmp */
+/* Mount /tmp on TMPFS */
+
+mount -t tmpfs /tmp
+
+#elif defined(CONFIG_FS_FAT)
+
+/* Create a FAT RAMDISK and mount it at /tmp */
 
 mkrd -m CONFIG_ETC_FATDEVNO -s CONFIG_ETC_FATSECTSIZE CONFIG_ETC_FATNSECTORS
 mkfatfs CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO)
 mount -t vfat CONCAT(/dev/ram, CONFIG_ETC_FATDEVNO) CONFIG_ETC_FATMOUNTPT
 
-#endif /* CONFIG_FS_FAT */
+#endif /* CONFIG_FS_TMPFS || CONFIG_FS_FAT */
 #endif /* CONFIG_ETC_ROMFS */

Reply via email to