summaryrefslogtreecommitdiff
path: root/udev/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-08-11 20:33:17 +0200
committerKay Sievers <kay.sievers@vrfy.org>2011-08-11 20:37:49 +0200
commit79449642ebcb6170adb8d6391518e328a07d9552 (patch)
tree63583426345bbc26ec8f755a6edfc09482c9c0ab /udev/udevd.c
parent2a30eaa452ad614c1957735fef47a7bc200db9cd (diff)
do not remove static nodes on module unload
Diffstat (limited to 'udev/udevd.c')
-rw-r--r--udev/udevd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/udev/udevd.c b/udev/udevd.c
index 1220deaaa6..f1a31e7afb 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -889,10 +889,11 @@ static void static_dev_create_from_modules(struct udev *udev)
if (sscanf(devno, "%c%u:%u", &type, &maj, &min) != 3)
continue;
+ /* set sticky bit, so we do not remove the node on module unload */
if (type == 'c')
- mode = 0600 | S_IFCHR;
+ mode = 01600|S_IFCHR;
else if (type == 'b')
- mode = 0600 | S_IFBLK;
+ mode = 01600|S_IFBLK;
else
continue;