aboutsummaryrefslogtreecommitdiff
path: root/toys/mdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/mdev.c')
-rw-r--r--toys/mdev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/toys/mdev.c b/toys/mdev.c
index dff2e5c2..6e69a770 100644
--- a/toys/mdev.c
+++ b/toys/mdev.c
@@ -7,7 +7,7 @@
*
* Not in SUSv3.
-USE_MDEV(NEWTOY(mdev, "s", TOYFLAG_USR|TOYFLAG_BIN))
+USE_MDEV(NEWTOY(mdev, "s", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_UMASK))
config MDEV
bool "mdev"
@@ -166,7 +166,6 @@ found_device:
}
sprintf(temp, "/dev/%s", device_name);
- umask(0);
if (mknod(temp, mode | type, makedev(major, minor)) && errno != EEXIST)
perror_exit("mknod %s failed", temp);