chiark / gitweb /
do not remove static nodes on module unload
[elogind.git] / udev / udevd.c
index 1220deaaa6619472fc00493d45a93d60845b11da..f1a31e7afbb4c767e250cf6f0dd120bf33a28c58 100644 (file)
@@ -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;
 
                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')
                if (type == 'c')
-                       mode = 0600 | S_IFCHR;
+                       mode = 01600|S_IFCHR;
                else if (type == 'b')
                else if (type == 'b')
-                       mode = 0600 | S_IFBLK;
+                       mode = 01600|S_IFBLK;
                else
                        continue;
 
                else
                        continue;