Now that we have xopen3(), it's just plain unclean to have xopen() with
[oweals/busybox.git] / miscutils / rx.c
index 41673b60e2abffa105f6e142e6009c5ce09bd854..4cc4913e6ba7de13f165dd2eee6599b17d49bd3e 100644 (file)
  */
 
 #include "busybox.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <termios.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-
 
 #define SOH 0x01
 #define STX 0x02
@@ -274,8 +262,8 @@ int rx_main(int argc, char **argv)
                        bb_show_usage();
 
        fn = argv[1];
-       ttyfd = bb_xopen3(CURRENT_TTY, O_RDWR, 0);
-       filefd = bb_xopen3(fn, O_RDWR|O_CREAT|O_TRUNC, 0666);
+       ttyfd = xopen3(CURRENT_TTY, O_RDWR, 0);
+       filefd = xopen3(fn, O_RDWR|O_CREAT|O_TRUNC, 0666);
 
        if (tcgetattr(ttyfd, &tty) < 0)
                        bb_error_msg_and_die("%s: tcgetattr failed: %m\n", argv[0]);