summaryrefslogtreecommitdiff
path: root/src/client/plymouth.c
diff options
context:
space:
mode:
authorCharlie Brej <cbrej@cs.man.ac.uk>2010-06-03 15:45:36 +0100
committerCharlie Brej <cbrej@cs.man.ac.uk>2010-06-03 15:45:36 +0100
commitce884c5ca25aaa6223516030ba9b1c201999590a (patch)
treef7a470b4d4872fda257f01787261a46808979aeb /src/client/plymouth.c
parent74ed81c79c37c852d9011159efe1ddbdecb1fb65 (diff)
[client] Add ignore-keystroke command
Adds an ignore-keystroke command. This does the same thing as the ignore-keystroke option, but is migrated to a command. The option still exists for compatibility.
Diffstat (limited to 'src/client/plymouth.c')
-rw-r--r--src/client/plymouth.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/client/plymouth.c b/src/client/plymouth.c
index c219cf6c..f454a21f 100644
--- a/src/client/plymouth.c
+++ b/src/client/plymouth.c
@@ -634,6 +634,27 @@ on_keystroke_request (state_t *state,
}
static void
+on_keystroke_ignore (state_t *state,
+ const char *command)
+{
+ char *keys;
+
+ keys = NULL;
+
+ ply_command_parser_get_command_options (state->command_parser,
+ command,
+ "keys", &keys,
+ NULL);
+
+ ply_boot_client_ask_daemon_to_ignore_keystroke (state->client,
+ keys,
+ (ply_boot_client_answer_handler_t)
+ on_success,
+ (ply_boot_client_response_handler_t)
+ on_failure, state);
+}
+
+static void
on_progress_pause_request (state_t *state,
const char *command)
{
@@ -928,6 +949,14 @@ main (int argc,
NULL);
ply_command_parser_add_command (state.command_parser,
+ "ignore-keystroke", "Remove sensitivity to a keystroke",
+ (ply_command_handler_t)
+ on_keystroke_ignore, &state,
+ "keys", "Keys to remove sensitivity to",
+ PLY_COMMAND_OPTION_TYPE_STRING,
+ NULL);
+
+ ply_command_parser_add_command (state.command_parser,
"pause-progress", "Pause boot progress bar",
(ply_command_handler_t)
on_progress_pause_request, &state,