mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-21 06:11:35 +08:00
apps/nshlib: (1) NSH prompt string is now configurable. nsh> is still the default. (2) Increase the default configuration for the maximum number of command line arguments to 7 (CONFIG_NSH_MAXARGUMENTS). This is needed for 'mount' with the -o option.
This commit is contained in:
15
nshlib/nsh.h
15
nshlib/nsh.h
@@ -464,7 +464,7 @@
|
||||
|
||||
/* This is the maximum number of arguments that will be accepted for a
|
||||
* command. Here we attempt to select the smallest number possible depending
|
||||
* upon the of commands that are available. Most commands use six or fewer
|
||||
* upon the of commands that are available. Most commands use seven or fewer
|
||||
* arguments, but there are a few that require more.
|
||||
*
|
||||
* This value is also configurable with CONFIG_NSH_MAXARGUMENTS. This
|
||||
@@ -472,10 +472,6 @@
|
||||
* commands that require more commands than NSH is aware of.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NSH_MAXARGUMENTS
|
||||
# define CONFIG_NSH_MAXARGUMENTS 6
|
||||
#endif
|
||||
|
||||
#if CONFIG_NSH_MAXARGUMENTS < 11
|
||||
# if defined(CONFIG_NET) && !defined(CONFIG_NSH_DISABLE_IFCONFIG)
|
||||
# undef CONFIG_NSH_MAXARGUMENTS
|
||||
@@ -483,15 +479,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if CONFIG_NSH_MAXARGUMENTS < 7
|
||||
# if defined(CONFIG_NET_UDP) && CONFIG_NFILE_DESCRIPTORS > 0
|
||||
# if !defined(CONFIG_NSH_DISABLE_GET) || !defined(CONFIG_NSH_DISABLE_PUT)
|
||||
# undef CONFIG_NSH_MAXARGUMENTS
|
||||
# define CONFIG_NSH_MAXARGUMENTS 7
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Argument list size
|
||||
*
|
||||
* argv[0]: The command name.
|
||||
|
Reference in New Issue
Block a user