]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-device-manager: verify_add_or_change(): Move local_console_is_text check
authorHans de Goede <hdegoede@redhat.com>
Mon, 28 Feb 2022 15:36:58 +0000 (16:36 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 7 Mar 2022 14:12:09 +0000 (15:12 +0100)
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 <hdegoede@redhat.com>
src/libply-splash-core/ply-device-manager.c

index 82b89f3573aef44f3e4d4758cc29878a1bf3d419..7043c7a81b37ab7d3a2a7cb449bce7ddce6836f2 100644 (file)
@@ -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;