summaryrefslogtreecommitdiff
path: root/mknod.c
diff options
context:
space:
mode:
Diffstat (limited to 'mknod.c')
-rw-r--r--mknod.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mknod.c b/mknod.c
index 0c93df6..caa234f 100644
--- a/mknod.c
+++ b/mknod.c
@@ -58,6 +58,7 @@ int mknod_main(int argc, char **argv)
argc--;
argv++;
parse_mode(*argv, &perm);
+ umask(0);
break;
default:
usage(mknod_usage);
@@ -87,7 +88,7 @@ int mknod_main(int argc, char **argv)
}
if (mode == S_IFCHR || mode == S_IFBLK) {
- dev = (atoi(argv[2]) << 8) | atoi(argv[1]);
+ dev = (atoi(argv[2]) << 8) | atoi(argv[3]);
}
mode |= perm;