From: Ray Strode Date: Tue, 19 Aug 2008 18:37:46 +0000 (-0400) Subject: Force details plugin if serial console is present X-Git-Tag: 0.6.0~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3141ec7afccc011d16ee12acc75ddc13d91b3d5f;p=thirdparty%2Fplymouth.git Force details plugin if serial console is present 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. --- diff --git a/src/main.c b/src/main.c index e6121e3e..205cad1c 100644 --- a/src/main.c +++ b/src/main.c @@ -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");