mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 08:52:01 +08:00
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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user