From 1a0809d73fc411f94d406f6895eb1cb941c3907d Mon Sep 17 00:00:00 2001 From: Jerzy Kasenberg Date: Mon, 16 Mar 2020 14:41:02 +0100 Subject: [PATCH] sys/console: Don't show prompt when echo is off Prompt is output on console that did not originated in application code. This is similar to echo characters that goes out of console outside of application decision. This disable printing prompt when echo is turned off so console code does not add anything to the output. --- sys/console/full/src/console.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/console/full/src/console.c b/sys/console/full/src/console.c index d937837d01..a2dc532043 100644 --- a/sys/console/full/src/console.c +++ b/sys/console/full/src/console.c @@ -471,6 +471,10 @@ console_prompt_set(const char *prompt, const char *line) } trailing_chars = 0; + if (!console_is_interactive) { + return; + } + locked = console_lock(1000) == OS_OK; console_switch_to_prompt();