From 839620a95470fe84230185ee9e9491fe3d078da7 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Sun, 14 Apr 2019 08:35:49 -0600 Subject: [PATCH] configs/stm32f103-minimum/src: Add PROCFS automount support --- configs/stm32f103-minimum/src/stm32_bringup.c | 11 +++++++++++ configs/stm32f103-minimum/src/stm32f103_minimum.h | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/configs/stm32f103-minimum/src/stm32_bringup.c b/configs/stm32f103-minimum/src/stm32_bringup.c index 8b1d25bc24..da884476ee 100644 --- a/configs/stm32f103-minimum/src/stm32_bringup.c +++ b/configs/stm32f103-minimum/src/stm32_bringup.c @@ -206,6 +206,17 @@ int stm32_bringup(void) } #endif +#ifdef CONFIG_FS_PROCFS + /* Mount the procfs file system */ + + ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", + STM32_PROCFS_MOUNTPOINT, ret); + } +#endif + #ifdef HAVE_AT24 /* Initialize the AT24 driver */ diff --git a/configs/stm32f103-minimum/src/stm32f103_minimum.h b/configs/stm32f103-minimum/src/stm32f103_minimum.h index 813e433d66..a13ad9e4f8 100644 --- a/configs/stm32f103-minimum/src/stm32f103_minimum.h +++ b/configs/stm32f103-minimum/src/stm32f103_minimum.h @@ -70,6 +70,16 @@ # undef HAVE_AT24 #endif +/* procfs File System */ + +#ifdef CONFIG_FS_PROCFS +# ifdef CONFIG_NSH_PROC_MOUNTPOINT +# define STM32_PROCFS_MOUNTPOINT CONFIG_NSH_PROC_MOUNTPOINT +# else +# define STM32_PROCFS_MOUNTPOINT "/proc" +# endif +#endif + /* If we are going to mount the AT24, then they user must also have told * us what to do with it by setting one of these. */