termios: Fix wrong ECHO flag

Follow https://github.com/apache/nuttx/pull/8800

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi
2023-03-13 17:23:34 +08:00
committed by Petro Karashchenko
parent fc1045271a
commit ea4437fc76
2 changed files with 9 additions and 9 deletions

View File

@@ -204,7 +204,7 @@ int nsh_login(FAR struct console_stdio_s *pstate)
{
if (tcgetattr(INFD(pstate), &cfg) == 0)
{
cfg.c_iflag &= ~ECHO;
cfg.c_lflag &= ~ECHO;
tcsetattr(INFD(pstate), TCSANOW, &cfg);
}
}
@@ -221,7 +221,7 @@ int nsh_login(FAR struct console_stdio_s *pstate)
{
if (tcgetattr(INFD(pstate), &cfg) == 0)
{
cfg.c_iflag |= ECHO;
cfg.c_lflag |= ECHO;
tcsetattr(INFD(pstate), TCSANOW, &cfg);
}
}