summaryrefslogtreecommitdiff
path: root/udev-add.c
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2003-11-19 09:23:24 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:06:25 -0700
commit5bd1061cd67dea7ebc5a061365335b394f37b122 (patch)
tree0f5202721ef880ccdeccc24c36998f31ccb021e8 /udev-add.c
parent3258c8288784e94094dc491e8b280238d62b3e5c (diff)
[PATCH] fix permissions to work properly now.
Forgot about umask in mknod...
Diffstat (limited to 'udev-add.c')
-rw-r--r--udev-add.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/udev-add.c b/udev-add.c
index 6f0e3bf105..7ba873a8d4 100644
--- a/udev-add.c
+++ b/udev-add.c
@@ -135,6 +135,12 @@ static int create_node(struct udevice *dev)
dbg("mknod(%s, %#o, %u, %u) failed with error '%s'",
filename, dev->mode, dev->major, dev->minor, strerror(errno));
+ dbg("chmod(%s, %#o)", filename, dev->mode);
+ retval = chmod(filename, dev->mode);
+ if (retval)
+ dbg("chmod(%s, %#o) failed with error '%s'",
+ filename, dev->mode, strerror(errno));
+
if (*dev->owner) {
char *endptr;
unsigned long id = strtoul(dev->owner, &endptr, 10);