diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/bb_askpass.c | 12 |
1 files changed, 1 insertions, 11 deletions
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) | |||
37 | 37 | ||
38 | tcgetattr(fd, &oldtio); | 38 | tcgetattr(fd, &oldtio); |
39 | tio = oldtio; | 39 | tio = oldtio; |
40 | #if 0 | ||
41 | /* Switch off UPPERCASE->lowercase conversion (never used since 198x) | ||
42 | * and XON/XOFF (why we want to mess with this??) | ||
43 | */ | ||
44 | # ifndef IUCLC | ||
45 | # define IUCLC 0 | ||
46 | # endif | ||
47 | tio.c_iflag &= ~(IUCLC|IXON|IXOFF|IXANY); | ||
48 | #endif | ||
49 | /* Switch off echo */ | 40 | /* Switch off echo */ |
50 | tio.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL); | 41 | tio.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL); |
51 | tcsetattr(fd, TCSANOW, &tio); | 42 | tcsetattr(fd, TCSANOW, &tio); |
@@ -66,9 +57,8 @@ char* FAST_FUNC bb_ask(const int fd, int timeout, const char *prompt) | |||
66 | while (1) { | 57 | while (1) { |
67 | int r = read(fd, &ret[i], 1); | 58 | int r = read(fd, &ret[i], 1); |
68 | if ((i == 0 && r == 0) /* EOF (^D) with no password */ | 59 | if ((i == 0 && r == 0) /* EOF (^D) with no password */ |
69 | || r < 0 | 60 | || r < 0 /* read is interrupted by timeout or ^C */ |
70 | ) { | 61 | ) { |
71 | /* read is interrupted by timeout or ^C */ | ||
72 | ret = NULL; | 62 | ret = NULL; |
73 | break; | 63 | break; |
74 | } | 64 | } |