diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-02-08 19:58:47 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-02-08 19:58:47 +0000 |
commit | e49d5ecbbe51718fa925b6890a735e5937cc2aa2 (patch) | |
tree | c90bda10731ad9333ce3b404f993354c9fc104b8 /coreutils/mkfifo.c | |
parent | c0bf817bbc5c7867fbe8fb76d5c39f8ee802692f (diff) |
Some formatting updates (ran the code through indent)
-Erik
Diffstat (limited to 'coreutils/mkfifo.c')
-rw-r--r-- | coreutils/mkfifo.c | 64 |
1 files changed, 36 insertions, 28 deletions
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index 676592ac7..c74402d4c 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * Mini mkfifo implementation for busybox * @@ -26,36 +27,43 @@ #include <errno.h> static const char mkfifo_usage[] = "mkfifo [OPTIONS] name\n\n" -"Create the named fifo\n\n" -"Options:\n" -"\t-m\tcreate the fifo with the specified mode; default = a=rw-umask\n"; + "Create the named fifo\n\n" + + "Options:\n" + "\t-m\tcreate the fifo with the specified mode; default = a=rw-umask\n"; extern int mkfifo_main(int argc, char **argv) { - char *thisarg; - mode_t mode = 0666; - argc--; - argv++; + char *thisarg; + mode_t mode = 0666; + + argc--; + argv++; - /* Parse any options */ - while (argc > 1) { - if (**argv != '-') usage(mkfifo_usage); - thisarg = *argv; thisarg++; - switch (*thisarg) { - case 'm': - argc--; argv++; - parse_mode(*argv, &mode); - break; - default: - usage (mkfifo_usage); - } - argc--; argv++; - } - if (argc < 1) usage (mkfifo_usage); - if (mkfifo(*argv, mode) < 0) { - perror("mkfifo"); - exit(255); - } else { - exit(TRUE); - } + /* Parse any options */ + while (argc > 1) { + if (**argv != '-') + usage(mkfifo_usage); + thisarg = *argv; + thisarg++; + switch (*thisarg) { + case 'm': + argc--; + argv++; + parse_mode(*argv, &mode); + break; + default: + usage(mkfifo_usage); + } + argc--; + argv++; + } + if (argc < 1) + usage(mkfifo_usage); + if (mkfifo(*argv, mode) < 0) { + perror("mkfifo"); + exit(255); + } else { + exit(TRUE); + } } |