From: Hans de Goede Date: Mon, 28 Feb 2022 15:36:58 +0000 (+0100) Subject: ply-device-manager: verify_add_or_change(): Move local_console_is_text check X-Git-Tag: 23.51.283~97^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5acb3ceee3b815bcd338ee75492739dfd57475c5;p=thirdparty%2Fplymouth.git ply-device-manager: verify_add_or_change(): Move local_console_is_text check Move the local_console_is_text check outside of the "if (subsytem == SUBSYSTEM_DRM)" block. This check is equally relevant for SUBSYSTEM_FRAME_BUFFER. Note by itself this is a no-op since verify_add_or_change() *always* returns false for SUBSYSTEM_FRAME_BUFFER devices. This is a preparation patch for making verify_add_or_change() not return false when manager->device_timeout_elapsed is set. Signed-off-by: Hans de Goede --- diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c index 82b89f35..7043c7a8 100644 --- a/src/libply-splash-core/ply-device-manager.c +++ b/src/libply-splash-core/ply-device-manager.c @@ -450,14 +450,14 @@ verify_add_or_change (ply_device_manager_t *manager, if (strcmp (action, "add") && strcmp (action, "change")) return false; + if (manager->local_console_managed && manager->local_console_is_text) { + ply_trace ("ignoring since we're already using text splash for local console"); + return false; + } + subsystem = udev_device_get_subsystem (device); if (strcmp (subsystem, SUBSYSTEM_DRM) == 0) { - if (manager->local_console_managed && manager->local_console_is_text) { - ply_trace ("ignoring since we're already using text splash for local console"); - return false; - } - if (!verify_drm_device (device)) { ply_trace ("ignoring since we only handle SimpleDRM devices after timeout"); return false;