]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Add --debug command to client
authorRay Strode <rstrode@redhat.com>
Tue, 5 Aug 2008 21:19:02 +0000 (17:19 -0400)
committerRay Strode <rstrode@redhat.com>
Tue, 5 Aug 2008 21:28:14 +0000 (17:28 -0400)
src/client/plymouth.c

index 746bec94b3fc964e9039aa3be2e3bd0bfcb1b935..df9018c77843ee2738e7fb21847d636577f5c073 100644 (file)
@@ -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))