Applied patch from Gennady Feldman to use single-thread instead of forking.
[oweals/busybox.git] / rpmunpack.c
index 0f36077c12b09e7eecd2689fb72d9b8c4e850fd2..12e9c71de33e0fd21d008dfec3f24f0add9d3083 100644 (file)
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  */
  
-#include "busybox.h" 
 #include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include "busybox.h" 
 
 /*
  * Some general definitions
@@ -41,7 +44,7 @@ static void myread(int num, char *buffer)
        if (err < 0)
                perror_msg_and_die(progname);
        else
-               error_msg_and_die("Unexpected end of input file!\n");
+               error_msg_and_die("Unexpected end of input file!");
   }
 }
 
@@ -61,7 +64,7 @@ int rpmunpack_main(int argc, char **argv)
 
   /* Check for command line parameters */
        if (argc>=2 && *argv[1]=='-') {
-           usage(rpmunpack_usage);
+           show_usage();
        }
 
   /* Open input file */