From e0307fcd8fc0aee0a3d8589ad2a9fa8e4667c5d9 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 23 Nov 2019 07:58:50 -0600 Subject: [PATCH] boards/sim/sim/sim/src/sim_bringup.c: Mount tmpfs to CONFIG_LIBC_TMPDIR in sim_bringup if CONFIG_FS_TMPFS is defined. --- boards/sim/sim/sim/src/sim_bringup.c | 11 +++++++++++ net/route/Kconfig | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/boards/sim/sim/sim/src/sim_bringup.c b/boards/sim/sim/sim/src/sim_bringup.c index cd3423e1ed..3839a8bc8b 100644 --- a/boards/sim/sim/sim/src/sim_bringup.c +++ b/boards/sim/sim/sim/src/sim_bringup.c @@ -118,6 +118,17 @@ int sim_bringup(void) } #endif +#ifdef CONFIG_FS_TMPFS + /* Mount the tmpfs file system */ + + ret = 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_LIB_ZONEINFO_ROMFS /* Mount the TZ database */ diff --git a/net/route/Kconfig b/net/route/Kconfig index 8c291a9edb..1a937a2a5f 100644 --- a/net/route/Kconfig +++ b/net/route/Kconfig @@ -112,7 +112,7 @@ config ROUTE_MAX_IPv6_RAMROUTES config ROUTE_FILEDIR string "Routing table directory" - default /tmp + default LIBC_TMPDIR depends on ROUTE_IPv4_FILEROUTE || ROUTE_IPv6_FILEROUTE ---help--- Provides the full path to location in the file system where routing