X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=mkfifo.c;h=ef4a5256f4ec0327469160ea58eb128c732d7771;hb=46f44d24fcc25a5d6e13e0453485881bdf147e91;hp=ef3d667e2a981a52ab495f9f96849a884ff978e8;hpb=7ab9c7ee52db8759d457819f5480378fa3aa97cc;p=oweals%2Fbusybox.git diff --git a/mkfifo.c b/mkfifo.c index ef3d667e2..ef4a5256f 100644 --- a/mkfifo.c +++ b/mkfifo.c @@ -20,20 +20,11 @@ * */ -#include "internal.h" +#include "busybox.h" #include #include -#include #include -static const char mkfifo_usage[] = "mkfifo [OPTIONS] name\n" -#ifndef BB_FEATURE_TRIVIAL_HELP - "\nCreates a named pipe (identical to 'mknod name p')\n\n" - "Options:\n" - "\t-m\tcreate the pipe using the specified mode (default a=rw)\n" -#endif - ; - extern int mkfifo_main(int argc, char **argv) { char *thisarg; @@ -60,12 +51,11 @@ extern int mkfifo_main(int argc, char **argv) argc--; argv++; } - if (argc < 1) + if (argc < 1 || *argv[0] == '-') usage(mkfifo_usage); if (mkfifo(*argv, mode) < 0) { perror("mkfifo"); - exit(255); - } else { - exit(TRUE); + return EXIT_FAILURE; } + return EXIT_SUCCESS; }