From: Ray Strode Date: Tue, 5 Aug 2008 21:19:02 +0000 (-0400) Subject: Add --debug command to client X-Git-Tag: 0.6.0~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=942380da47873469754de972694c91629966d587;p=thirdparty%2Fplymouth.git Add --debug command to client --- diff --git a/src/client/plymouth.c b/src/client/plymouth.c index 746bec94..df9018c7 100644 --- a/src/client/plymouth.c +++ b/src/client/plymouth.c @@ -175,7 +175,7 @@ main (int argc, char **argv) { state_t state = { 0 }; - bool should_help, should_quit, should_ping, should_sysinit, should_ask_for_password, should_show_splash, should_hide_splash, should_wait; + bool should_help, should_quit, should_ping, should_sysinit, should_ask_for_password, should_show_splash, should_hide_splash, should_wait, should_be_verbose; char *status, *chroot_dir; int exit_code; @@ -189,6 +189,7 @@ main (int argc, ply_command_parser_add_options (state.command_parser, "help", "This help message", PLY_COMMAND_OPTION_TYPE_FLAG, + "debug", "Enable verbose debug logging", PLY_COMMAND_OPTION_TYPE_FLAG, "newroot", "Tell boot daemon that new root filesystem is mounted", PLY_COMMAND_OPTION_TYPE_STRING, "quit", "Tell boot daemon to quit", PLY_COMMAND_OPTION_TYPE_FLAG, "ping", "Check of boot daemon is running", PLY_COMMAND_OPTION_TYPE_FLAG, @@ -221,6 +222,7 @@ main (int argc, ply_command_parser_get_options (state.command_parser, "help", &should_help, + "debug", &should_be_verbose, "newroot", &chroot_dir, "quit", &should_quit, "ping", &should_ping, @@ -247,6 +249,9 @@ main (int argc, return 0; } + if (should_be_verbose && !ply_is_tracing ()) + ply_toggle_tracing (); + if (!ply_boot_client_connect (state.client, (ply_boot_client_disconnect_handler_t) on_disconnect, &state))