summaryrefslogtreecommitdiff
path: root/src/mknod.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-11-09 23:49:53 +0000
committerJim Meyering <jim@meyering.net>1995-11-09 23:49:53 +0000
commit6161f25abc10361251f77bfd3c69ea370e83d82d (patch)
treea20d350aa69679691617f9840aa0df2fa5af7ca0 /src/mknod.c
parent0898b54377def7ef9a0d50e48e58d239ed182b21 (diff)
downloadcoreutils-6161f25abc10361251f77bfd3c69ea370e83d82d.tar.xz
(main): Move to the end.
Remove fwd dcls.
Diffstat (limited to 'src/mknod.c')
-rw-r--r--src/mknod.c52
1 files changed, 25 insertions, 27 deletions
diff --git a/src/mknod.c b/src/mknod.c
index e21c66d36..30989bcce 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -38,8 +38,6 @@
#include "error.h"
#include "xstrtol.h"
-static void usage (int status);
-
/* The name this program was run with. */
char *program_name;
@@ -57,6 +55,31 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
+static void
+usage (int status)
+{
+ if (status != 0)
+ fprintf (stderr, "Try `%s --help' for more information.\n",
+ program_name);
+ else
+ {
+ printf ("Usage: %s [OPTION]... NAME TYPE [MAJOR MINOR]\n", program_name);
+ printf ("\
+Create the special file NAME of the given TYPE.\n\
+\n\
+ -m, --mode=MODE set permission mode (as in chmod), not 0666 - umask\n\
+ --help display this help and exit\n\
+ --version output version information and exit\n\
+\n\
+MAJOR MINOR are forbidden for TYPE p, mandatory otherwise. TYPE may be:\n\
+\n\
+ b create a block (buffered) special file\n\
+ c, u create a character (unbuffered) special file \n\
+ p create a FIFO\n");
+ }
+ exit (status);
+}
+
void
main (int argc, char **argv)
{
@@ -201,28 +224,3 @@ major and minor device numbers may not be specified for fifo files");
exit (0);
}
-
-static void
-usage (int status)
-{
- if (status != 0)
- fprintf (stderr, "Try `%s --help' for more information.\n",
- program_name);
- else
- {
- printf ("Usage: %s [OPTION]... NAME TYPE [MAJOR MINOR]\n", program_name);
- printf ("\
-Create the special file NAME of the given TYPE.\n\
-\n\
- -m, --mode=MODE set permission mode (as in chmod), not 0666 - umask\n\
- --help display this help and exit\n\
- --version output version information and exit\n\
-\n\
-MAJOR MINOR are forbidden for TYPE p, mandatory otherwise. TYPE may be:\n\
-\n\
- b create a block (buffered) special file\n\
- c, u create a character (unbuffered) special file \n\
- p create a FIFO\n");
- }
- exit (status);
-}