diff toys/mdev.c @ 257:951110c37fee

Add TOYFLAG_UMASK.
author Rob Landley <rob@landley.net>
date Tue, 12 Feb 2008 19:05:44 -0600
parents bf3f98a58ee2
children b4077be6c746
line wrap: on
line diff
--- a/toys/mdev.c	Tue Feb 12 18:41:34 2008 -0600
+++ b/toys/mdev.c	Tue Feb 12 19:05:44 2008 -0600
@@ -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 @@
 	}
 
 	sprintf(temp, "/dev/%s", device_name);
-	umask(0);
 	if (mknod(temp, mode | type, makedev(major, minor)) && errno != EEXIST)
 		perror_exit("mknod %s failed", temp);