summaryrefslogtreecommitdiff
path: root/udev/udev-event.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/udev-event.c
parent2a30eaa452ad614c1957735fef47a7bc200db9cd (diff)
do not remove static nodes on module unload
Diffstat (limited to 'udev/udev-event.c')
-rw-r--r--udev/udev-event.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c
index 823768a3e2..391fce81c3 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -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);
}