]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
main: support plymouth.force-scale on the kernel command line
authorMichael Kuhn <suraia@ikkoku.de>
Mon, 22 Aug 2016 16:39:35 +0000 (18:39 +0200)
committerRay Strode <rstrode@redhat.com>
Tue, 23 Aug 2016 14:01:33 +0000 (10:01 -0400)
This can be used to override the DeviceScale setting.

https://bugs.freedesktop.org/show_bug.cgi?id=97424

src/main.c

index 3b7b17911299e51a5d8089cfb37173bcd533cb58..0864e5e1629a2ecd5500d5556e0fcaba18b8e26e 100644 (file)
@@ -440,6 +440,17 @@ find_override_splash (state_t *state)
         }
 }
 
+static void
+find_force_scale (state_t *state)
+{
+        const char *scale_string;
+
+        scale_string = command_line_get_string_after_prefix (state->kernel_command_line, "plymouth.force-scale=");
+
+        if (scale_string != NULL)
+                ply_set_device_scale (strtoul (scale_string, NULL, 0));
+}
+
 static void
 find_system_default_splash (state_t *state)
 {
@@ -2333,6 +2344,8 @@ main (int    argc,
                 state.splash_delay = NAN;
         }
 
+        find_force_scale (&state);
+
         load_devices (&state, device_manager_flags);
 
         ply_trace ("entering event loop");