summaryrefslogtreecommitdiff
path: root/sbin/mknod/mknod.c
diff options
context:
space:
mode:
authornatano <natano@cvs.openbsd.org>2016-03-05 19:29:42 +0000
committernatano <natano@cvs.openbsd.org>2016-03-05 19:29:42 +0000
commitf9ac7eecc1bade0e6cad15b04d09a6dee9fa87d9 (patch)
treefa6bb9f2745449c5a32b619b92858338352b1016 /sbin/mknod/mknod.c
parent571d2e3efb4b81ca444d485a56e04579b1894b54 (diff)
Remove unused node type; ok espie@
Diffstat (limited to 'sbin/mknod/mknod.c')
-rw-r--r--sbin/mknod/mknod.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sbin/mknod/mknod.c b/sbin/mknod/mknod.c
index 521395eaba6..2fc39e77347 100644
--- a/sbin/mknod/mknod.c
+++ b/sbin/mknod/mknod.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mknod.c,v 1.23 2016/03/05 17:15:43 tb Exp $ */
+/* $OpenBSD: mknod.c,v 1.24 2016/03/05 19:29:41 natano Exp $ */
/* $NetBSD: mknod.c,v 1.8 1995/08/11 00:08:18 jtc Exp $ */
/*
@@ -34,7 +34,6 @@ struct node {
const char *name;
mode_t mode;
dev_t dev;
- char type;
char mflag;
};
@@ -93,7 +92,6 @@ main(int argc, char *argv[])
while (*argv) {
node[n].mode = mode | S_IFIFO;
node[n].mflag = mflag;
- node[n].type = 'p';
node[n].name = *argv;
node[n].dev = 0;
n++;
@@ -110,10 +108,9 @@ main(int argc, char *argv[])
if (strlen(argv[1]) != 1)
errx(1, "node must be type 'b|c|p' %s",
argv[1]);
- node[n].type = argv[1][0];
/* XXX computation offset by one for next getopt */
- switch(node[n].type) {
+ switch(argv[1][0]) {
case 'p':
node[n].mode |= S_IFIFO;
node[n].dev = 0;
@@ -131,8 +128,8 @@ common:
argc-=3;
break;
default:
- errx(1, "node must be type 'b|c|p' %c",
- node[n].type);
+ errx(1, "node must be type 'b|c|p' %s",
+ argv[1]);
}
n++;
}