rfkill: fix erroneous behavior when polling the udev monitor (#6489)
authorS. Fan <sfanxiang@gmail.com>
Mon, 31 Jul 2017 10:10:10 +0000 (05:10 -0500)
committerLennart Poettering <lennart@poettering.net>
Mon, 31 Jul 2017 10:10:10 +0000 (12:10 +0200)
commit8ec1a07998758f6a85f3ea5bf2ed14d87609398f
tree1866bc7ae68b0cceecef40983f16a97b982b00dd
parent0864d311766498563331f486909a0d950ba7de87
rfkill: fix erroneous behavior when polling the udev monitor (#6489)

Comparing udev_device_get_sysname(device) and sysname will always return
true. We need to check the device received from udev monitor instead.

Also, fd_wait_for_event() sometimes never exits. Better set a timeout
here.
src/rfkill/rfkill.c