diff options
author | Ray Strode <rstrode@redhat.com> | 2009-11-27 23:34:05 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2009-11-28 00:24:59 -0500 |
commit | d52b4efba18c4295618302fea9674e54c36e1b7e (patch) | |
tree | ec63f3c34c45a4345ec48641059528437ed6bb26 | |
parent | 45967baeb0249f1f3fd1b18db9a4a1cdd5e1fa83 (diff) |
[client] Add new deactivate subcommandno-fbcon
This tells the daemon we're about to start X with -nr and
to get ready for the transition.
-rw-r--r-- | src/client/ply-boot-client.c | 12 | ||||
-rw-r--r-- | src/client/ply-boot-client.h | 4 | ||||
-rw-r--r-- | src/client/plymouth.c | 16 |
3 files changed, 32 insertions, 0 deletions
diff --git a/src/client/ply-boot-client.c b/src/client/ply-boot-client.c index 5f7bb54f..917a6199 100644 --- a/src/client/ply-boot-client.c +++ b/src/client/ply-boot-client.c @@ -653,6 +653,18 @@ ply_boot_client_tell_daemon_to_hide_splash (ply_boot_client_t * } 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, ply_boot_client_response_handler_t handler, diff --git a/src/client/ply-boot-client.h b/src/client/ply-boot-client.h index 43684ac4..0e9122c4 100644 --- a/src/client/ply-boot-client.h +++ b/src/client/ply-boot-client.h @@ -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, diff --git a/src/client/plymouth.c b/src/client/plymouth.c index 80b0ec65..8669fd2a 100644 --- a/src/client/plymouth.c +++ b/src/client/plymouth.c @@ -594,6 +594,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) { @@ -710,6 +721,11 @@ main (int argc, 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) on_quit_request, &state, |