summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorScott James Remnant <scott@ubuntu.com>2009-02-23 18:33:49 +0000
committerScott James Remnant <scott@ubuntu.com>2009-02-23 18:33:49 +0000
commit80be8c48c59708c52993ceddeedef8c2ed417016 (patch)
tree79b687263f0ce28079f23f0c9326d7fbba79fa14 /udev
parentb8e96d67a2c842dc750b5193cb732a077a3149ed (diff)
Look at more inotify events in the buffer than just the first.
Diffstat (limited to 'udev')
-rw-r--r--udev/udevd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/udev/udevd.c b/udev/udevd.c
index 5598628a51..cfc091b699 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -546,9 +546,10 @@ static int handle_inotify(struct udev *udev)
read(inotify_fd, buf, nbytes);
- for (pos = 0, ev = (struct inotify_event *)(buf + pos); pos < nbytes; pos += sizeof(struct inotify_event) + ev->len) {
+ for (pos = 0; pos < nbytes; pos += sizeof(struct inotify_event) + ev->len) {
struct udev_device *dev;
+ ev = (struct inotify_event *)(buf + pos);
if (ev->len) {
dbg(udev, "inotify event: %x for %s\n", ev->mask, ev->name);
reload_config = 1;