chiark / gitweb /
udevd: fix initial timeout handling
authorKay Sievers <kay.sievers@suse.de>
Mon, 3 Oct 2005 14:36:52 +0000 (16:36 +0200)
committerKay Sievers <kay.sievers@suse.de>
Mon, 3 Oct 2005 14:36:52 +0000 (16:36 +0200)
UDEVD_EVENT_TIMEOUT=0 didn't work directly after udevd startup.
The whole event timeout handling is not needed since we use netlink.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
udevd.c

diff --git a/udevd.c b/udevd.c
index e227a64..5974d14 100644 (file)
--- a/udevd.c
+++ b/udevd.c
@@ -410,8 +410,9 @@ recheck:
 
                /* limit timeout during initialization phase */
                if (init_phase) {
-                       timeout = UDEVD_INIT_EVENT_TIMEOUT;
-                       dbg("initialization phase, limit timeout to %i seconds", UDEVD_INIT_EVENT_TIMEOUT);
+                       if (timeout > UDEVD_INIT_EVENT_TIMEOUT)
+                               timeout = UDEVD_INIT_EVENT_TIMEOUT;
+                       dbg("initialization phase, timeout %i seconds", timeout);
                }
 
                /* move event with expired timeout to the exec list */