Update the lash shell (hopefully the last time...) so things like
[oweals/busybox.git] / makedevs.c
index c8206e020e5d3f8208b375402fe50ea32280fe07..b8c6dd1d8331f39a7d97ba49a5504c1305124e10 100644 (file)
@@ -7,28 +7,13 @@
  * known bugs: can't deal with alpha ranges
  */
 
-#include "internal.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/types.h>
-#include <sys/stat.h>
-
-static const char makedevs_usage[] =
-       "makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]\n\n"
-       "Creates a range of block or character special files\n\n"
-       "TYPEs include:\n"
-       "\tb:\tMake a block (buffered) device.\n"
-       "\tc or u:\tMake a character (un-buffered) device.\n"
-       "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes.\n\n"
-       "FIRST specifies the number appended to NAME to create the first device.\n"
-       "LAST specifies the number of the last item that should be created.\n"
-       "If 's' is the last argument, the base device is created as well.\n\n"
-       "For example:\n"
-       "\tmakedevs /dev/ttyS c 4 66 2 63   ->  ttyS2-ttyS63\n"
-       "\tmakedevs /dev/hda b 3 0 0 8 s    ->  hda,hda1-hda8\n";
+#include "busybox.h"
 
 int makedevs_main(int argc, char **argv)
 {
@@ -47,7 +32,7 @@ int makedevs_main(int argc, char **argv)
        char buf[255];
 
        if (argc < 7 || *argv[1]=='-')
-               usage(makedevs_usage);
+               show_usage();
 
        switch (type[0]) {
        case 'c':
@@ -60,7 +45,7 @@ int makedevs_main(int argc, char **argv)
                mode = S_IFIFO;
                break;
        default:
-               usage(makedevs_usage);
+               show_usage();
        }
        mode |= 0660;