Skip to content
Commit c7d6c310 authored by Jim Paris's avatar Jim Paris Committed by Ioannis Glaropoulos
Browse files

shell: fix log output when CONFIG_LOG_IMMEDIATE=y



With CONFIG_LOG_IMMEDIATE, log output is printed immediately.  If a
shell command is in progress, there's no prompt to erase, nor should
we print a new prompt after the log message is output.

Before this patch, a simple shell command like:

  int cmd_log_erase(const struct shell *shell, size_t argc, char **argv)
  {
          LOG_INF("hello world");
          return 0;
  }

would output something like:

  uart:~$ log erase
  [00:00:02.623,718] <inf> cmd_log: hello world
  uart:~$ loguart:~$

This patch fixes prompt handling while a command is active, and fixes
put_sync_hexdump to behave like put_sync_string.

Signed-off-by: default avatarJim Paris <jim@jtan.com>
parent 942e9dcc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment