Merge remote-tracking branch 'origin/master' into bas24
This commit is contained in:
commit
ad6ea1a9da
@ -1095,3 +1095,5 @@
|
|||||||
issues. From Radoslaw Adamczyk (2014-10-23).
|
issues. From Radoslaw Adamczyk (2014-10-23).
|
||||||
* apps/examples/keypadtest/keypadtest_main.c: Fixes to keypadtest from
|
* apps/examples/keypadtest/keypadtest_main.c: Fixes to keypadtest from
|
||||||
Pierre-Noel Bouteville (2014-10-23).
|
Pierre-Noel Bouteville (2014-10-23).
|
||||||
|
* apps/nshlib/nsh_parse.c, nsh.h, and Kconfig: Move CONFIG_NSH_TMPDIR
|
||||||
|
to CONFIG_LIBC_TMPDIR (2014-11-05).
|
||||||
|
@ -77,17 +77,6 @@ config NSH_CMDPARMS
|
|||||||
Because this feature commits significant resources, it is disabled by
|
Because this feature commits significant resources, it is disabled by
|
||||||
default.
|
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
|
config NSH_MAXARGUMENTS
|
||||||
int "Maximum number of command arguments"
|
int "Maximum number of command arguments"
|
||||||
default 6
|
default 6
|
||||||
|
@ -100,8 +100,8 @@
|
|||||||
* hold temporary files must be provided.
|
* hold temporary files must be provided.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NSH_CMDPARMS) && !defined(CONFIG_NSH_TMPDIR)
|
#if defined(CONFIG_NSH_CMDPARMS) && !defined(CONFIG_LIBC_TMPDIR)
|
||||||
# define CONFIG_NSH_TMPDIR "/tmp"
|
# define CONFIG_LIBC_TMPDIR "/tmp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Networking support. Make sure that all non-boolean configuration
|
/* Networking support. Make sure that all non-boolean configuration
|
||||||
|
@ -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 */
|
/* Create a unique file name using the task ID */
|
||||||
|
|
||||||
tmpfile = NULL;
|
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)
|
if (ret < 0 || !tmpfile)
|
||||||
{
|
{
|
||||||
nsh_output(vtbl, g_fmtcmdoutofmemory, "``");
|
nsh_output(vtbl, g_fmtcmdoutofmemory, "``");
|
||||||
|
Loading…
Reference in New Issue
Block a user