summaryrefslogtreecommitdiffstats
path: root/sbin/mknod/mknod.c
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1998-07-06 07:06:15 +0000
committercharnier <charnier@FreeBSD.org>1998-07-06 07:06:15 +0000
commit2f22f79b32324422335e75e611755a4976a9b43e (patch)
treed36276fae6030365f1436d0149d794429d731eb4 /sbin/mknod/mknod.c
parentf345a63c405580475c77eb0a94335c4edd9e04fc (diff)
downloadFreeBSD-src-2f22f79b32324422335e75e611755a4976a9b43e.zip
FreeBSD-src-2f22f79b32324422335e75e611755a4976a9b43e.tar.gz
Remove unused #include. Add usage().
Diffstat (limited to 'sbin/mknod/mknod.c')
-rw-r--r--sbin/mknod/mknod.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/sbin/mknod/mknod.c b/sbin/mknod/mknod.c
index 21f63db..fc2192f 100644
--- a/sbin/mknod/mknod.c
+++ b/sbin/mknod/mknod.c
@@ -43,21 +43,26 @@ static const char copyright[] =
#ifndef lint
#if 0
static char sccsid[] = "@(#)mknod.c 8.1 (Berkeley) 6/5/93";
-#else
-static const char rcsid[] =
- "$Id: mknod.c,v 1.6 1997/03/12 19:03:40 bde Exp $";
#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <sys/types.h>
#include <sys/stat.h>
+#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <unistd.h>
-#include <err.h>
+
+static void
+usage()
+{
+ (void)fprintf(stderr, "usage: mknod name [b | c] major minor\n");
+ exit(1);
+}
int
main(argc, argv)
@@ -70,11 +75,8 @@ main(argc, argv)
mode_t mode;
int range_error;
- if (argc != 5) {
- (void)fprintf(stderr,
- "usage: mknod name [b | c] major minor\n");
- exit(1);
- }
+ if (argc != 5)
+ usage();
mode = 0666;
if (argv[2][0] == 'c')
OpenPOWER on IntegriCloud