chiark / gitweb /
do not remove static nodes on module unload
[elogind.git] / udev / udev-event.c
index 823768a3e2977df6e4a6059d9afcb695c39da229..391fce81c3214806539e5692e316b4c19f142190 100644 (file)
@@ -1030,6 +1030,10 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules,
                                }
                        }
 
                                }
                        }
 
+                       /* set sticky bit, so we do not remove the node on module unload */
+                       if (event->static_node)
+                               event->mode |= 01000;
+
                        err = udev_node_add(dev, event->mode, event->uid, event->gid);
                }
 
                        err = udev_node_add(dev, event->mode, event->uid, event->gid);
                }