mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-01-20 11:09:22 +07:00
libudev: queue - watch entire directory to allow the re-use of the watch descriptor
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
a31296d41e
commit
9031b0d0a7
@ -245,7 +245,7 @@ _public_ int udev_queue_get_fd(struct udev_queue *udev_queue) {
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
r = inotify_add_watch(fd, "/run/udev/queue" , IN_DELETE);
|
||||
r = inotify_add_watch(fd, "/run/udev" , IN_DELETE);
|
||||
if (r < 0) {
|
||||
r = -errno;
|
||||
close(fd);
|
||||
|
@ -135,7 +135,7 @@ static int adm_settle(struct udev *udev, int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* wake up when queue is empty */
|
||||
if (poll(pfd, 1, 100) > 0 && pfd[0].revents & POLLIN)
|
||||
if (poll(pfd, 1, MSEC_PER_SEC) > 0 && pfd[0].revents & POLLIN)
|
||||
udev_queue_flush(queue);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user