From f18f94ee182eaf7028362bd95d492316afd8679f Mon Sep 17 00:00:00 2001 From: Frank Li Date: Sat, 28 May 2022 23:38:59 +0800 Subject: [PATCH] shell: fix shell start obscure invaild. When CONFIG_SHELL_START_OBSCURED is enabled, obscure should be set by default to ensure that shell input is hidden by default when the system starts. Signed-off-by: Frank Li --- include/zephyr/shell/shell.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/zephyr/shell/shell.h b/include/zephyr/shell/shell.h index 4771c62242e..a6838265e5e 100644 --- a/include/zephyr/shell/shell.h +++ b/include/zephyr/shell/shell.h @@ -717,14 +717,14 @@ BUILD_ASSERT((sizeof(struct shell_backend_config_flags) == sizeof(uint32_t)), /** * @internal @brief Default backend configuration. */ -#define SHELL_DEFAULT_BACKEND_CONFIG_FLAGS \ -{ \ - .insert_mode = 0, \ - .echo = 1, \ - .obscure = 0, \ - .mode_delete = 1, \ - .use_colors = 1, \ - .use_vt100 = 1, \ +#define SHELL_DEFAULT_BACKEND_CONFIG_FLAGS \ +{ \ + .insert_mode = 0, \ + .echo = 1, \ + .obscure = IS_ENABLED(CONFIG_SHELL_START_OBSCURED), \ + .mode_delete = 1, \ + .use_colors = 1, \ + .use_vt100 = 1, \ }; struct shell_backend_ctx_flags {