From: Ray Strode Date: Wed, 25 Apr 2012 22:22:00 +0000 (-0400) Subject: main: add plymouth.ignore-serial-consoles X-Git-Tag: 0.8.5~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e50233b031ed301813de7f075ae0d606eae010c;p=thirdparty%2Fplymouth.git main: add plymouth.ignore-serial-consoles This commit adds plymouth.ignore-serial-consoles kernel command line for OLPC to use. Eventually, we'll support multiple plugins at once, and we can run details on the serial console and e.g. two-step on the main console and then this argument won't be needed. --- diff --git a/src/main.c b/src/main.c index 191c514e..c85fe4c6 100644 --- a/src/main.c +++ b/src/main.c @@ -2018,19 +2018,30 @@ check_for_consoles (state_t *state, char *console; ply_hashtable_t *consoles; int num_consoles; + bool ignore_serial_consoles; ply_trace ("checking for consoles%s", should_add_displays? " and adding displays": ""); consoles = ply_hashtable_new (ply_hashtable_string_hash, ply_hashtable_string_compare); + ignore_serial_consoles = command_line_has_argument (state->kernel_command_line, "plymouth.ignore-serial-consoles"); - num_consoles = add_consoles_from_file (state, consoles, "/sys/class/tty/console/active"); + num_consoles = 0; + + if (!ignore_serial_consoles) + { + num_consoles = add_consoles_from_file (state, consoles, "/sys/class/tty/console/active"); - if (num_consoles == 0) + if (num_consoles == 0) + { + ply_trace ("falling back to kernel command line"); + num_consoles = add_consoles_from_kernel_command_line (state, consoles); + } + } + else { - ply_trace ("falling back to kernel command line"); - num_consoles = add_consoles_from_kernel_command_line (state, consoles); + ply_trace ("ignoring all consoles but default console because of plymouth.ignore-serial-consoles"); } console = ply_hashtable_remove (consoles, (void *) "/dev/tty0");