diff options
author | Erik Andersen | 2000-01-07 18:30:40 +0000 |
---|---|---|
committer | Erik Andersen | 2000-01-07 18:30:40 +0000 |
commit | 812d46667d8f558f58f1e668169d359b1203c5ef (patch) | |
tree | 2c6d50a4c7a33431a288fb523622d2e311663438 /mknod.c | |
parent | 96e2abd0849c1980dad10013ef0d17027554ef9f (diff) | |
download | busybox-812d46667d8f558f58f1e668169d359b1203c5ef.zip busybox-812d46667d8f558f58f1e668169d359b1203c5ef.tar.gz |
More minor fixes.
-Erik
Diffstat (limited to 'mknod.c')
-rw-r--r-- | mknod.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -27,9 +27,9 @@ #include <fcntl.h> #include <unistd.h> -static const char mknod_usage[] = "mknod [OPTION]... NAME TYPE MAJOR MINOR\n\n" +static const char mknod_usage[] = "mknod NAME TYPE MAJOR MINOR\n\n" "Make block or character special files.\n\n" -"Options:\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"; @@ -40,6 +40,9 @@ mknod_main(int argc, char** argv) mode_t mode = 0; dev_t dev = 0; + if ( argc != 5 || **(argv+1) == '-' ) { + usage (mknod_usage); + } switch(argv[2][0]) { case 'c': case 'u': |