summaryrefslogtreecommitdiff
path: root/udev/udev-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev/udev-event.c')
-rw-r--r--udev/udev-event.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c
index e34f09cfe3..592da01099 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -600,6 +600,14 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules)
/* create new node and symlinks */
err = udev_node_add(dev, event->mode, event->uid, event->gid);
+
+ /* watch for changes */
+ if (event->inotify_watch && inotify_fd != -1) {
+ info(event->udev, "device will be watched for changes\n");
+ udev_watch_begin(event->udev, event->dev);
+ } else {
+ udev_watch_clear(event->udev, event->dev);
+ }
goto exit;
}