You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/01/22 14:54:52 UTC

[nuttx] branch master updated: stm32f4disco: Add support to mount /tmp

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 1c6dd7030f stm32f4disco: Add support to mount /tmp
1c6dd7030f is described below

commit 1c6dd7030fea1588e997f7411a61442beba9bf03
Author: Alan Carvalho de Assis <ac...@gmail.com>
AuthorDate: Sun Jan 22 09:34:41 2023 -0300

    stm32f4disco: Add support to mount /tmp
---
 boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c
index 3761a8db21..d1d77384e3 100644
--- a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c
+++ b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c
@@ -515,6 +515,17 @@ int stm32_bringup(void)
     }
 #endif
 
+#ifdef CONFIG_FS_TMPFS
+  /* Mount the tmpfs file system */
+
+  ret = nx_mount(NULL, CONFIG_LIBC_TMPDIR, "tmpfs", 0, NULL);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to mount tmpfs at %s: %d\n",
+             CONFIG_LIBC_TMPDIR, ret);
+    }
+#endif
+
 #ifdef CONFIG_STM32_ROMFS
   ret = stm32_romfs_initialize();
   if (ret < 0)