You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/05/04 13:13:43 UTC
[incubator-nuttx] 04/04: boards: qemu-i486: Mount procfs in
board_app_initialize()
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit d3851699d778a332a29b12a823c469fe1d453eda
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Mon May 4 18:01:45 2020 +0900
boards: qemu-i486: Mount procfs in board_app_initialize()
---
boards/x86/qemu/qemu-i486/src/qemu_appinit.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/boards/x86/qemu/qemu-i486/src/qemu_appinit.c b/boards/x86/qemu/qemu-i486/src/qemu_appinit.c
index c4622f6..7c80aaa 100644
--- a/boards/x86/qemu/qemu-i486/src/qemu_appinit.c
+++ b/boards/x86/qemu/qemu-i486/src/qemu_appinit.c
@@ -40,6 +40,9 @@
#include <nuttx/config.h>
#include <nuttx/board.h>
+#include <sys/mount.h>
+#include <stdio.h>
+
#include "up_internal.h"
/****************************************************************************
@@ -74,6 +77,18 @@
#ifdef CONFIG_LIB_BOARDCTL
int board_app_initialize(uintptr_t arg)
{
- return 0;
+ int ret = OK;
+
+#ifdef CONFIG_FS_PROCFS
+ /* Mount the proc filesystem */
+
+ ret = mount(NULL, "/proc", "procfs", 0, NULL);
+ if (ret < 0)
+ {
+ serr("ERROR: Failed to mount procfs at %s: %d\n", "/proc", ret);
+ }
+#endif
+
+ return ret;
}
#endif /* CONFIG_LIB_BOARDCTL */