diff options
-rw-r--r-- | apps/nshlib/Kconfig | 11 | ||||
-rw-r--r-- | apps/nshlib/nsh.h | 4 | ||||
-rw-r--r-- | apps/nshlib/nsh_parse.c | 2 | ||||
-rw-r--r-- | nuttx/fs/Kconfig | 10 |
4 files changed, 13 insertions, 14 deletions
diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig index ba9c718b4..3e212e746 100644 --- a/apps/nshlib/Kconfig +++ b/apps/nshlib/Kconfig @@ -77,17 +77,6 @@ config NSH_CMDPARMS Because this feature commits significant resources, it is disabled by default. -config NSH_TMPDIR - string "Temporary file directory" - default "/tmp" - depends on NSH_CMDPARMS - ---help--- - If NSH_CMDPARMS is selected, then function output will be retained - in a temporary file. In that case, this string must be provided to - specify the full path to a directory where temporary files can be - created. This would be a good application of RAM disk: To provide - temporary storage for function output. - config NSH_MAXARGUMENTS int "Maximum number of command arguments" default 6 diff --git a/apps/nshlib/nsh.h b/apps/nshlib/nsh.h index dc13e3753..d726b5253 100644 --- a/apps/nshlib/nsh.h +++ b/apps/nshlib/nsh.h @@ -100,8 +100,8 @@ * hold temporary files must be provided. */ -#if defined(CONFIG_NSH_CMDPARMS) && !defined(CONFIG_NSH_TMPDIR) -# define CONFIG_NSH_TMPDIR "/tmp" +#if defined(CONFIG_NSH_CMDPARMS) && !defined(CONFIG_LIBC_TMPDIR) +# define CONFIG_LIBC_TMPDIR "/tmp" #endif /* Networking support. Make sure that all non-boolean configuration diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c index 2ed9452cf..a7a35e8f2 100644 --- a/apps/nshlib/nsh_parse.c +++ b/apps/nshlib/nsh_parse.c @@ -874,7 +874,7 @@ static FAR char *nsh_cmdparm(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline, /* Create a unique file name using the task ID */ tmpfile = NULL; - ret = asprintf(&tmpfile, "%s/TMP%d.dat", CONFIG_NSH_TMPDIR, getpid()); + ret = asprintf(&tmpfile, "%s/TMP%d.dat", CONFIG_LIBC_TMPDIR, getpid()); if (ret < 0 || !tmpfile) { nsh_output(vtbl, g_fmtcmdoutofmemory, "``"); diff --git a/nuttx/fs/Kconfig b/nuttx/fs/Kconfig index 8de3f51b0..92828d9ac 100644 --- a/nuttx/fs/Kconfig +++ b/nuttx/fs/Kconfig @@ -61,6 +61,16 @@ source fs/smartfs/Kconfig source fs/binfs/Kconfig source fs/procfs/Kconfig +config LIBC_TMPDIR + string "Temporary file directory" + default "/tmp" + depends on FS_WRITABLE + ---help--- + If a write-able file system is selected, this string will be + provided to specify the full path to a directory where temporary + files can be created. This would be a good application of RAM disk: + To provide temporary storage for application data. + comment "System Logging" config SYSLOG |