From: William Jon McCann Date: Tue, 24 Feb 2009 00:01:41 +0000 (-0500) Subject: add debug command line option X-Git-Tag: 0.7.0~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80b2ed52c02a1498a14b520f84d5277948686a9a;p=thirdparty%2Fplymouth.git add debug command line option Used to override the kernel command line and enabled debugging --- diff --git a/src/main.c b/src/main.c index 0524bb67..5941c6d3 100644 --- a/src/main.c +++ b/src/main.c @@ -1179,8 +1179,7 @@ initialize_environment (state_t *state) redirect_standard_io_to_device (state->console); else redirect_standard_io_to_device ("tty1"); - - + for (node = ply_list_get_first_node (state->windows); node; node = ply_list_get_next_node (state->windows, node)) { @@ -1230,6 +1229,7 @@ main (int argc, int exit_code; bool should_help = false; bool no_daemon = false; + bool debug = false; ply_daemon_handle_t *daemon_handle; char *mode_string = NULL; @@ -1241,6 +1241,7 @@ main (int argc, "help", "This help message", PLY_COMMAND_OPTION_TYPE_FLAG, "attach-to-session", "pty_master_fd", PLY_COMMAND_OPTION_TYPE_INTEGER, "no-daemon", "Do not daemonize", PLY_COMMAND_OPTION_TYPE_FLAG, + "debug", "Output debugging information", PLY_COMMAND_OPTION_TYPE_FLAG, "mode", "Mode is one of: boot, shutdown", PLY_COMMAND_OPTION_TYPE_STRING, NULL); @@ -1260,6 +1261,7 @@ main (int argc, "help", &should_help, "mode", &mode_string, "no-daemon", &no_daemon, + "debug", &debug, "attach-to-session", &state.ptmx, NULL); if (should_help) @@ -1277,6 +1279,9 @@ main (int argc, return 0; } + if (debug && !ply_is_tracing ()) + ply_toggle_tracing (); + if (mode_string != NULL) { if (strcmp (mode_string, "shutdown") == 0)