diff options
Diffstat (limited to 'common/cli_hush.c')
-rw-r--r-- | common/cli_hush.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/cli_hush.c b/common/cli_hush.c index cbaf22e912..00861e2d9e 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -978,12 +978,22 @@ static inline void setup_prompt_string(int promptmode, char **prompt_str) static int uboot_cli_readline(struct in_str *i) { char *prompt; + char __maybe_unused *ps_prompt = NULL; if (i->promptmode == 1) prompt = CONFIG_SYS_PROMPT; else prompt = CONFIG_SYS_PROMPT_HUSH_PS2; +#ifdef CONFIG_CMDLINE_PS_SUPPORT + if (i->promptmode == 1) + ps_prompt = getenv("PS1"); + else + ps_prompt = getenv("PS2"); + if (ps_prompt) + prompt = ps_prompt; +#endif + return cli_readline(prompt); } #endif |