diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-01-12 18:09:19 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-01-12 18:09:19 -0600 |
commit | e25eae1f17c966060e1087bd332e530ca6667a8d (patch) | |
tree | 6f44ecfdc9f624c0be3fa41ffc2d392261e0a3c8 /apps/nshlib | |
parent | e6975ce8f818d4d3db9d61f3a2b2b8b8cbda96a5 (diff) | |
download | px4-nuttx-e25eae1f17c966060e1087bd332e530ca6667a8d.tar.gz px4-nuttx-e25eae1f17c966060e1087bd332e530ca6667a8d.tar.bz2 px4-nuttx-e25eae1f17c966060e1087bd332e530ca6667a8d.zip |
Recent NSH changes broke the minimal NSH configuration
Diffstat (limited to 'apps/nshlib')
-rw-r--r-- | apps/nshlib/nsh_parse.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c index b9f1d1853..fe9a3d4c6 100644 --- a/apps/nshlib/nsh_parse.c +++ b/apps/nshlib/nsh_parse.c @@ -86,7 +86,7 @@ # define NSH_MEMLIST_TYPE uint8_t # define NSH_MEMLIST_INIT(m) do { (m) = 0; } while (0) # define NSH_MEMLIST_ADD(m,a) -# define NSH_MEMLIST_FREE(m,a) +# define NSH_MEMLIST_FREE(m) #endif /**************************************************************************** @@ -147,8 +147,10 @@ static FAR char *nsh_cmdparm(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline, static FAR char *nsh_strcat(FAR struct nsh_vtbl_s *vtbl, FAR char *s1, FAR const char *s2); #endif +#ifndef CONFIG_DISABLE_ENVIRON static FAR char *nsh_envexpand(FAR struct nsh_vtbl_s *vtbl, FAR char *varname); +#endif static FAR char *nsh_argexpand(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline, FAR char **allocation); static FAR char *nsh_argument(FAR struct nsh_vtbl_s *vtbl, char **saveptr, @@ -408,7 +410,9 @@ static int nsh_execute(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char *argv[], FAR const char *redirfile, int oflags) { +#if CONFIG_NFILE_STREAMS > 0 || !defined(CONFIG_NSH_DISABLEBG) int fd = -1; +#endif int ret; /* Does this command correspond to an application filename? @@ -1678,10 +1682,8 @@ static int nsh_parse_command(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline) FAR char *argv[MAX_ARGV_ENTRIES]; FAR char *saveptr; FAR char *cmd; -#if CONFIG_NFILE_STREAMS > 0 FAR char *redirfile = NULL; int oflags = 0; -#endif int argc; int ret; |