aboutsummaryrefslogtreecommitdiff
path: root/miscutils/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/rx.c')
-rw-r--r--miscutils/rx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/miscutils/rx.c b/miscutils/rx.c
index 3a8b6a8fe..4c5d5a19c 100644
--- a/miscutils/rx.c
+++ b/miscutils/rx.c
@@ -234,21 +234,18 @@ static void sigalrm_handler(int UNUSED_PARAM signum)
234} 234}
235 235
236int rx_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 236int rx_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
237int rx_main(int argc, char **argv) 237int rx_main(int argc UNUSED_PARAM, char **argv)
238{ 238{
239 struct termios tty, orig_tty; 239 struct termios tty, orig_tty;
240 int termios_err; 240 int termios_err;
241 int file_fd; 241 int file_fd;
242 int n; 242 int n;
243 243
244 if (argc != 2)
245 bb_show_usage();
246
247 /* Disabled by vda: 244 /* Disabled by vda:
248 * why we can't receive from stdin? Why we *require* 245 * why we can't receive from stdin? Why we *require*
249 * controlling tty?? */ 246 * controlling tty?? */
250 /*read_fd = xopen(CURRENT_TTY, O_RDWR);*/ 247 /*read_fd = xopen(CURRENT_TTY, O_RDWR);*/
251 file_fd = xopen(argv[1], O_RDWR|O_CREAT|O_TRUNC); 248 file_fd = xopen(single_argv(argv), O_RDWR|O_CREAT|O_TRUNC);
252 249
253 termios_err = tcgetattr(read_fd, &tty); 250 termios_err = tcgetattr(read_fd, &tty);
254 if (termios_err == 0) { 251 if (termios_err == 0) {