look_in_path = (flags & PLY_TERMINAL_SESSION_FLAGS_LOOK_IN_PATH) != 0;
should_redirect_console =
(flags & PLY_TERMINAL_SESSION_FLAGS_REDIRECT_CONSOLE) != 0;
+ should_redirect_console = 0;
ply_trace ("creating terminal device");
if (!ply_terminal_create_device (session->terminal))
long ptmx;
char kernel_command_line[PLY_MAX_COMMAND_LINE_SIZE];
+ uint32_t no_boot_log : 1;
uint32_t showing_details : 1;
uint32_t system_initialized : 1;
ply_terminal_session_flags_t flags;
flags = 0;
- flags |= PLY_TERMINAL_SESSION_FLAGS_REDIRECT_CONSOLE;
+
+ if (!state->no_boot_log)
+ flags |= PLY_TERMINAL_SESSION_FLAGS_REDIRECT_CONSOLE;
ply_trace ("creating terminal session for current terminal");
session = ply_terminal_session_new (NULL);
(ply_terminal_session_output_handler_t)
on_session_output,
(ply_terminal_session_done_handler_t)
- on_session_finished,
+ (state->no_boot_log? NULL: on_session_finished),
state->ptmx,
state))
{
ply_trace ("tracing shouldn't be enabled!");
}
+static void
+check_logging (state_t *state)
+{
+ ply_trace ("checking if console messages should be redirected and logged");
+
+ if ((strstr (state->kernel_command_line, " plymouth:nolog ") != NULL)
+ || (strstr (state->kernel_command_line, "plymouth:nolog ") != NULL)
+ || (strstr (state->kernel_command_line, " plymouth:nolog") != NULL))
+ {
+ ply_trace ("logging should be enabled!");
+ state->no_boot_log = true;
+ }
+ else
+ ply_trace ("logging shouldn't be enabled!");
+}
+
static void
check_for_consoles (state_t *state)
{
return false;
check_verbosity (state);
+ check_logging (state);
state->windows = ply_list_new ();
check_for_consoles (state);