mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-09 22:45:11 +00:00
examples/lvglterm: Let the shell be named something other than nsh.
The terminal spawned "nsh" by a name compiled in, which finds nothing on a system that installs NSH under another name, as a kernel build does when NSH is the system's init: the program is /system/bin/init and no "nsh" exists at all. The terminal came up, took keystrokes, and had no shell behind it. The name is now configurable and still defaults to "nsh", so a bare name is looked up on PATH as before and a path is taken as given. Assisted-by: Claude:claude-opus-5 Signed-off-by: Justin Hammond <justin@dynam.ac>
This commit is contained in:
parent
145e64a5d4
commit
30a028d4e6
2 changed files with 20 additions and 1 deletions
|
|
@ -75,3 +75,13 @@ config EXAMPLES_LVGLTERM_STACKSIZE
|
|||
default 16384
|
||||
|
||||
endif # EXAMPLES_LVGLTERM
|
||||
|
||||
config EXAMPLES_LVGLTERM_SHELL
|
||||
string "Shell to run in the terminal"
|
||||
default "nsh"
|
||||
depends on EXAMPLES_LVGLTERM
|
||||
---help---
|
||||
The program the terminal spawns. A bare name is looked up on
|
||||
PATH; a path is taken as given, which is what a configuration
|
||||
installing NSH under another name needs -- "/system/bin/init",
|
||||
for instance, where NSH is the system's init.
|
||||
|
|
|
|||
|
|
@ -93,7 +93,16 @@
|
|||
|
||||
/* NSH Task to be started */
|
||||
|
||||
#define NSH_TASK "nsh"
|
||||
/* The shell to run. A name is looked up on PATH, a path is taken as
|
||||
* given, which matters where the shell is installed under another name,
|
||||
* as it is when NSH is built as the system's init.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_LVGLTERM_SHELL
|
||||
# define NSH_TASK CONFIG_EXAMPLES_LVGLTERM_SHELL
|
||||
#else
|
||||
# define NSH_TASK "nsh"
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue