udev: restore udevadm settle timeout
authorNir Soffer <nirsof@gmail.com>
Wed, 8 Apr 2015 01:04:16 +0000 (04:04 +0300)
committerDavid Herrmann <dh.herrmann@gmail.com>
Sat, 11 Apr 2015 10:35:07 +0000 (12:35 +0200)
commit0736455b1186c9515e0f093e1e686e684d225787
tree2d5033db5917183149b8dd6fb8c6ebf419dbeb65
parent64713f92528e8443b7ff2ce3ec0394920a751fb1
udev: restore udevadm settle timeout

Commit 9ea28c55a2 (udev: remove seqnum API and all assumptions about
seqnums) introduced a regresion, ignoring the timeout option when
waiting until the event queue is empty.

Previously, if the udev event queue was not empty when the timeout was
expired, udevadm settle was returning with exit code 1.  To check if the
queue is empty, you could invoke udevadm settle with timeout=0. This
patch restores the previous behavior.

(David: fixed timeout==0 handling and dropped redundant assignment)
src/udev/udevadm-settle.c