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 <lgl88911@163.com>
This commit is contained in:
Frank Li 2022-05-28 23:38:59 +08:00 committed by Carles Cufí
parent b161554ee8
commit f18f94ee18

View File

@ -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 {