]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Force details plugin if serial console is present
authorRay Strode <rstrode@redhat.com>
Tue, 19 Aug 2008 18:37:46 +0000 (14:37 -0400)
committerRay Strode <rstrode@redhat.com>
Tue, 19 Aug 2008 18:44:14 +0000 (14:44 -0400)
It's the only plugin that supports a NULL window right
now, and it's also what the user probably wants if
they're using a serial console.

src/main.c

index e6121e3e9363139f5407c700fb66de4680c13909..205cad1c856bccf98359d8242b65e31e298b1336 100644 (file)
@@ -207,6 +207,12 @@ plymouth_should_show_default_splash (state_t *state)
   };
   int i;
 
+  if (state->console != NULL)
+    return false;
+
+  if (state->window == NULL)
+    return false;
+
   for (i = 0; strings[i] != NULL; i++)
     {
       int cmp;
@@ -233,7 +239,9 @@ on_show_splash (state_t *state)
   if (state->window == NULL)
     {
       state->window = create_window (state, 1);
-      ply_window_take_console (state->window);
+
+      if (state->window != NULL && state->console == NULL)
+        ply_window_take_console (state->window);
     }
 
   if (plymouth_should_show_default_splash (state))
@@ -353,7 +361,7 @@ create_window (state_t    *state,
   ply_window_attach_to_event_loop (window, state->loop);
 
   ply_trace ("opening window");
-  if (!ply_window_open (window))
+  if (state->console == NULL && !ply_window_open (window))
     {
       ply_save_errno ();
       ply_trace ("could not open window: %m");