summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-05-11 22:59:09 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-05-11 22:59:09 +0200
commit79e1912b918eadb01cc969f7e08f6be0c47a5cbe (patch)
tree20ec7457ced2eedea330db3869c626541a4233fa /udev
parent422449339aebde83a45108b015f4e02b59b5c2c0 (diff)
udevd: reload config only for *.rules files
Diffstat (limited to 'udev')
-rw-r--r--udev/udevd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/udev/udevd.c b/udev/udevd.c
index 7712543734..77a14df7b0 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -685,14 +685,21 @@ static int handle_inotify(struct udev *udev)
ev = (struct inotify_event *)(buf + pos);
if (ev->len) {
- dbg(udev, "inotify event: %x for %s\n", ev->mask, ev->name);
+ const char *s;
+
+ info(udev, "inotify event: %x for %s\n", ev->mask, ev->name);
+ s = strstr(ev->name, ".rules");
+ if (s == NULL)
+ continue;
+ if (strlen(s) != strlen(".rules"))
+ continue;
reload_config = true;
continue;
}
dev = udev_watch_lookup(udev, ev->wd);
if (dev != NULL) {
- dbg(udev, "inotify event: %x for %s\n", ev->mask, udev_device_get_devnode(dev));
+ info(udev, "inotify event: %x for %s\n", ev->mask, udev_device_get_devnode(dev));
if (ev->mask & IN_CLOSE_WRITE) {
char filename[UTIL_PATH_SIZE];
int fd;