mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 21:48:09 +02:00
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.
This commit is contained in:
parent
e1e4779629
commit
6e50233b03
1 changed files with 15 additions and 4 deletions
19
src/main.c
19
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 (num_consoles == 0)
|
||||
if (!ignore_serial_consoles)
|
||||
{
|
||||
ply_trace ("falling back to kernel command line");
|
||||
num_consoles = add_consoles_from_kernel_command_line (state, consoles);
|
||||
num_consoles = add_consoles_from_file (state, consoles, "/sys/class/tty/console/active");
|
||||
|
||||
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 ("ignoring all consoles but default console because of plymouth.ignore-serial-consoles");
|
||||
}
|
||||
|
||||
console = ply_hashtable_remove (consoles, (void *) "/dev/tty0");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue