chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4224493
)
udevd: reload config only for *.rules files
author
Kay Sievers
<kay.sievers@vrfy.org>
Tue, 11 May 2010 20:59:09 +0000
(22:59 +0200)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Tue, 11 May 2010 20:59:09 +0000
(22:59 +0200)
udev/udevd.c
patch
|
blob
|
history
diff --git
a/udev/udevd.c
b/udev/udevd.c
index 7712543734aba9bf86d04f79e911683538500686..77a14df7b07afba30589801bfc068ae8db9283f8 100644
(file)
--- 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) {
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) {
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;
if (ev->mask & IN_CLOSE_WRITE) {
char filename[UTIL_PATH_SIZE];
int fd;