mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-09 05:58:27 +02:00
[client] add hide-splash and show-splash subcommands
This is to replace the old style --hide-splash and --show-splash options.
This commit is contained in:
parent
c0637bd800
commit
544f5bae0a
1 changed files with 34 additions and 0 deletions
|
|
@ -771,6 +771,28 @@ on_update_root_fs_request (state_t *state,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_show_splash_request (state_t *state,
|
||||
const char *command)
|
||||
{
|
||||
ply_boot_client_tell_daemon_to_show_splash (state->client,
|
||||
(ply_boot_client_response_handler_t)
|
||||
on_success,
|
||||
(ply_boot_client_response_handler_t)
|
||||
on_failure, state);
|
||||
}
|
||||
|
||||
static void
|
||||
on_hide_splash_request (state_t *state,
|
||||
const char *command)
|
||||
{
|
||||
ply_boot_client_tell_daemon_to_hide_splash (state->client,
|
||||
(ply_boot_client_response_handler_t)
|
||||
on_success,
|
||||
(ply_boot_client_response_handler_t)
|
||||
on_failure, state);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char **argv)
|
||||
|
|
@ -817,6 +839,18 @@ main (int argc,
|
|||
PLY_COMMAND_OPTION_TYPE_FLAG,
|
||||
NULL);
|
||||
|
||||
ply_command_parser_add_command (state.command_parser,
|
||||
"show-splash", "Tell daemon to show splash screen",
|
||||
(ply_command_handler_t)
|
||||
on_show_splash_request, &state,
|
||||
NULL);
|
||||
|
||||
ply_command_parser_add_command (state.command_parser,
|
||||
"hide-splash", "Tell daemon to hide splash screen",
|
||||
(ply_command_handler_t)
|
||||
on_hide_splash_request, &state,
|
||||
NULL);
|
||||
|
||||
ply_command_parser_add_command (state.command_parser,
|
||||
"ask-for-password", "Ask user for password",
|
||||
(ply_command_handler_t)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue