From 2f094ae82106e91cb210e79ddc2e5285377b549e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 7 Apr 2018 15:02:20 +0200 Subject: telnet: move winsize detection closer to I/O loop, delete non-functioning debug code Signed-off-by: Denys Vlasenko --- libbb/bb_askpass.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'libbb') diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c index aae35ec41..5599c82ef 100644 --- a/libbb/bb_askpass.c +++ b/libbb/bb_askpass.c @@ -37,15 +37,6 @@ char* FAST_FUNC bb_ask(const int fd, int timeout, const char *prompt) tcgetattr(fd, &oldtio); tio = oldtio; -#if 0 - /* Switch off UPPERCASE->lowercase conversion (never used since 198x) - * and XON/XOFF (why we want to mess with this??) - */ -# ifndef IUCLC -# define IUCLC 0 -# endif - tio.c_iflag &= ~(IUCLC|IXON|IXOFF|IXANY); -#endif /* Switch off echo */ tio.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL); tcsetattr(fd, TCSANOW, &tio); @@ -66,9 +57,8 @@ char* FAST_FUNC bb_ask(const int fd, int timeout, const char *prompt) while (1) { int r = read(fd, &ret[i], 1); if ((i == 0 && r == 0) /* EOF (^D) with no password */ - || r < 0 + || r < 0 /* read is interrupted by timeout or ^C */ ) { - /* read is interrupted by timeout or ^C */ ret = NULL; break; } -- cgit v1.2.3