]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[client] Add new deactivate subcommand no-fbcon
authorRay Strode <rstrode@redhat.com>
Sat, 28 Nov 2009 04:34:05 +0000 (23:34 -0500)
committerRay Strode <rstrode@redhat.com>
Sat, 28 Nov 2009 05:24:59 +0000 (00:24 -0500)
This tells the daemon we're about to start X with -nr and
to get ready for the transition.

src/client/ply-boot-client.c
src/client/ply-boot-client.h
src/client/plymouth.c

index 5f7bb54f8bfb0cbe7637da571f0d0d8e42ebf7d4..917a6199300c455214f2fe60389af8932437d6b8 100644 (file)
@@ -652,6 +652,18 @@ ply_boot_client_tell_daemon_to_hide_splash (ply_boot_client_t                  *
                                  NULL, handler, failed_handler, user_data);
 }
 
+void
+ply_boot_client_tell_daemon_to_deactivate (ply_boot_client_t                  *client,
+                                           ply_boot_client_response_handler_t  handler,
+                                           ply_boot_client_response_handler_t  failed_handler,
+                                           void                               *user_data)
+{
+  assert (client != NULL);
+
+  ply_boot_client_queue_request (client, PLY_BOOT_PROTOCOL_REQUEST_TYPE_DEACTIVATE,
+                                 NULL, handler, failed_handler, user_data);
+}
+
 void
 ply_boot_client_tell_daemon_to_quit (ply_boot_client_t                  *client,
                                      bool                                retain_splash,
index 43684ac4ae79c4ce1bed90cd55aefce5ad9be817..0e9122c4a0faa6b7408364efb4c2378c7109c48e 100644 (file)
@@ -104,6 +104,10 @@ void ply_boot_client_tell_daemon_to_hide_splash (ply_boot_client_t
                                                  ply_boot_client_response_handler_t  handler,
                                                  ply_boot_client_response_handler_t  failed_handler,
                                                  void                               *user_data);
+void ply_boot_client_tell_daemon_to_deactivate (ply_boot_client_t                  *client,
+                                                ply_boot_client_response_handler_t  handler,
+                                                ply_boot_client_response_handler_t  failed_handler,
+                                                void                               *user_data);
 void ply_boot_client_tell_daemon_to_quit (ply_boot_client_t                  *client,
                                           bool                                retain_splash,
                                           ply_boot_client_response_handler_t  handler,
index 80b0ec65730cc764df686e04a1a089ac63161cbe..8669fd2a4663519738ae9b8d524be8707bd13de2 100644 (file)
@@ -593,6 +593,17 @@ on_report_error_request (state_t    *state,
 
 }
 
+static void
+on_deactivate_request (state_t    *state,
+                       const char *command)
+{
+  ply_boot_client_tell_daemon_to_deactivate (state->client,
+                                             (ply_boot_client_response_handler_t)
+                                             on_success,
+                                             (ply_boot_client_response_handler_t)
+                                             on_failure, state);
+}
+
 static void
 on_quit_request (state_t    *state,
                  const char *command)
@@ -709,6 +720,11 @@ main (int    argc,
                                   on_report_error_request, &state,
                                   NULL);
 
+  ply_command_parser_add_command (state.command_parser,
+                                  "deactivate", "Tell boot daemon to deactivate",
+                                  (ply_command_handler_t)
+                                  on_deactivate_request, &state, NULL);
+
   ply_command_parser_add_command (state.command_parser,
                                   "quit", "Tell boot daemon to quit",
                                   (ply_command_handler_t)