Mercurial > hg > toybox
comparison toys/mkfifo.c @ 186:25447caf1b4b
Change command main() functions to return void, and exit(toys.exitval) from
the toybox infrastructure instead. Eliminates a return call from each command.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 29 Nov 2007 18:14:37 -0600 |
parents | 14fa82969ea3 |
children | d4176f3f3835 |
comparison
equal
deleted
inserted
replaced
185:29e2051296fd | 186:25447caf1b4b |
---|---|
5 * See http://www.opengroup.org/onlinepubs/009695399/utilities/mkfifo.html | 5 * See http://www.opengroup.org/onlinepubs/009695399/utilities/mkfifo.html |
6 */ | 6 */ |
7 | 7 |
8 #include "toys.h" | 8 #include "toys.h" |
9 | 9 |
10 int mkfifo_main(void) | 10 void mkfifo_main(void) |
11 { | 11 { |
12 char *arg; | 12 char *arg; |
13 int i; | 13 int i; |
14 mode_t mode; | 14 mode_t mode; |
15 | 15 |
22 | 22 |
23 umask(0); | 23 umask(0); |
24 for (i = 0; (arg = toys.optargs[i]); i++) | 24 for (i = 0; (arg = toys.optargs[i]); i++) |
25 if (mkfifo(arg, mode)) | 25 if (mkfifo(arg, mode)) |
26 perror_exit(arg); | 26 perror_exit(arg); |
27 | |
28 return 0; | |
29 } | 27 } |