projects
/
platform
/
upstream
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
659507f
)
libbb: fix bb_ask() to operate on correct fd
author
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 3 Feb 2010 11:17:06 +0000
(12:17 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 3 Feb 2010 11:17:06 +0000
(12:17 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/bb_askpass.c
patch
|
blob
|
history
diff --git
a/libbb/bb_askpass.c
b/libbb/bb_askpass.c
index
bf45780
..
12ebe17
100644
(file)
--- a/
libbb/bb_askpass.c
+++ b/
libbb/bb_askpass.c
@@
-38,7
+38,7
@@
char* FAST_FUNC bb_ask(const int fd, int timeout, const char *prompt)
#endif
tio.c_iflag &= ~(IUCLC|IXON|IXOFF|IXANY);
tio.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|TOSTOP);
- tcsetattr
_stdin_TCSANOW(
&tio);
+ tcsetattr
(fd, TCSANOW,
&tio);
memset(&sa, 0, sizeof(sa));
/* sa.sa_flags = 0; - no SA_RESTART! */
@@
-77,8
+77,7
@@
char* FAST_FUNC bb_ask(const int fd, int timeout, const char *prompt)
alarm(0);
}
sigaction_set(SIGINT, &oldsa);
-
- tcsetattr_stdin_TCSANOW(&oldtio);
+ tcsetattr(fd, TCSANOW, &oldtio);
bb_putchar('\n');
fflush_all();
return ret;