mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
shell: Fix shell_vfprintf when vt100 is disabled
Without this fix, for every call to shell_vfprintf, a prompt string and vt100 codes are printed too, resulting in mangled log output. Signed-off-by: Lars Knudsen <lakd@demant.com>
This commit is contained in:
committed by
Anas Nashif
parent
5eb17bca21
commit
fb408077df
@@ -1503,11 +1503,11 @@ void shell_vfprintf(const struct shell *sh, enum shell_vt100_color color,
|
||||
}
|
||||
|
||||
k_mutex_lock(&sh->ctx->wr_mtx, K_FOREVER);
|
||||
if (!z_flag_cmd_ctx_get(sh) && !sh->ctx->bypass) {
|
||||
if (!z_flag_cmd_ctx_get(sh) && !sh->ctx->bypass && z_flag_use_vt100_get(sh)) {
|
||||
z_shell_cmd_line_erase(sh);
|
||||
}
|
||||
z_shell_vfprintf(sh, color, fmt, args);
|
||||
if (!z_flag_cmd_ctx_get(sh) && !sh->ctx->bypass) {
|
||||
if (!z_flag_cmd_ctx_get(sh) && !sh->ctx->bypass && z_flag_use_vt100_get(sh)) {
|
||||
z_shell_print_prompt_and_cmd(sh);
|
||||
}
|
||||
z_transport_buffer_flush(sh);
|
||||
|
||||
Reference in New Issue
Block a user