diff options
author | Hans de Goede <hdegoede@redhat.com> | 2022-02-28 16:46:34 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2022-03-07 15:12:09 +0100 |
commit | 9a48b3b5328f094cfbfb110cb3b30df6c78ba061 (patch) | |
tree | d3e3ef691c1ef28901b82692c1c3965f89c08c57 | |
parent | 5acb3ceee3b815bcd338ee75492739dfd57475c5 (diff) |
ply-device-manager: Accept new simpledrm/fbdev devices from udev events after timeout
Before the device-timeout elapses verify_add_or_change () blocks new
simpledrm and fbdev getting added through udev add events because we
really only want native drm devices.
Then when the timeout triggers the list of udev devices existing at
that point int time is rescanned and any drm (including simpledrm) and
fbdev devices are added (filtering out duplicates).
But what if a simpledrm or fbdev device for some reason only shows
up after the timeout? Before this change those would then be ignored
for ever.
Add a manager->device_timeout_elapsed check and make verify_add_or_change ()
accept any drm + fbdev devices after the timeout. Note this addresses
a mostly theoretically issue since in practice a simpledrm or fbdev device
showing up later is very unlikely.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | src/libply-splash-core/ply-device-manager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c index 7043c7a8..215f5bef 100644 --- a/src/libply-splash-core/ply-device-manager.c +++ b/src/libply-splash-core/ply-device-manager.c @@ -455,6 +455,9 @@ verify_add_or_change (ply_device_manager_t *manager, return false; } + if (manager->device_timeout_elapsed) + return true; + subsystem = udev_device_get_subsystem (device); if (strcmp (subsystem, SUBSYSTEM_DRM) == 0) { |