apps: Remove the check of CONFIG_SERIAL_TERMIOS

If the code only change c_oflag, c_iflag and c_lflag, not c_cflag in termios.
Follow up the change from kernel: https://github.com/apache/nuttx/pull/8843

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-03-20 01:07:21 +08:00
committed by patacongo
parent 369c354dc7
commit 86080a110e
21 changed files with 24 additions and 134 deletions

View File

@@ -149,11 +149,9 @@ int nsh_login(FAR struct console_stdio_s *pstate)
#ifdef CONFIG_NSH_PLATFORM_CHALLENGE
char challenge[128];
#endif
struct termios cfg;
int ret;
int i;
#ifdef CONFIG_SERIAL_TERMIOS
struct termios cfg;
#endif
#ifdef CONFIG_NSH_PLATFORM_SKIP_LOGIN
if (platform_skip_login() == OK)
@@ -199,7 +197,6 @@ int nsh_login(FAR struct console_stdio_s *pstate)
/* Disable ECHO if its a tty device */
#ifdef CONFIG_SERIAL_TERMIOS
if (isatty(INFD(pstate)))
{
if (tcgetattr(INFD(pstate), &cfg) == 0)
@@ -208,7 +205,6 @@ int nsh_login(FAR struct console_stdio_s *pstate)
tcsetattr(INFD(pstate), TCSANOW, &cfg);
}
}
#endif
password[0] = '\0';
ret = readline_fd(pstate->cn_line, CONFIG_NSH_LINELEN,
@@ -216,7 +212,6 @@ int nsh_login(FAR struct console_stdio_s *pstate)
/* Enable echo again after password */
#ifdef CONFIG_SERIAL_TERMIOS
if (isatty(INFD(pstate)))
{
if (tcgetattr(INFD(pstate), &cfg) == 0)
@@ -225,7 +220,6 @@ int nsh_login(FAR struct console_stdio_s *pstate)
tcsetattr(INFD(pstate), TCSANOW, &cfg);
}
}
#endif
if (ret > 0)
{