summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-01-13 13:09:02 +0100
committerKay Sievers <kay.sievers@vrfy.org>2010-01-13 13:09:02 +0100
commit6f1892dc7abb26ca988521c89d563dd38a0349c0 (patch)
treed3a00070d1c5bce1cb12c74c1e4194a9bb51b4ee /udev
parenta16b18f0914226aed0f319499325e2d70866dec9 (diff)
udevd: inotify - do not parse rules at create but at close
We do not need to get notified about created files, only about moved ones or files closed-after-writing.
Diffstat (limited to 'udev')
-rw-r--r--udev/udevd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/udev/udevd.c b/udev/udevd.c
index 170225d00c..fe3352ceb5 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -887,15 +887,15 @@ int main(int argc, char *argv[])
if (udev_get_rules_path(udev) != NULL) {
inotify_add_watch(pfd[FD_INOTIFY].fd, udev_get_rules_path(udev),
- IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
+ IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
} else {
char filename[UTIL_PATH_SIZE];
struct stat statbuf;
inotify_add_watch(pfd[FD_INOTIFY].fd, LIBEXECDIR "/rules.d",
- IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
+ IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
inotify_add_watch(pfd[FD_INOTIFY].fd, SYSCONFDIR "/udev/rules.d",
- IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
+ IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
/* watch dynamic rules directory */
util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/rules.d", NULL);
@@ -906,7 +906,7 @@ int main(int argc, char *argv[])
udev_selinux_resetfscreatecon(udev);
}
inotify_add_watch(pfd[FD_INOTIFY].fd, filename,
- IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
+ IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
}
udev_watch_restore(udev);