From 58d03aeb6fe3519ef12a4cedcc3e47b8daaad9cc Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 10 Jun 2017 12:23:24 +0100 Subject: Add ability to set options in monkey --- frontends/monkey/main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c index be3460dac..1bea02471 100644 --- a/frontends/monkey/main.c +++ b/frontends/monkey/main.c @@ -208,6 +208,11 @@ static void quit_handler(int argc, char **argv) monkey_done = true; } +static void monkey_options_handle_command(int argc, char **argv) +{ + nsoption_commandline(&argc, argv, nsoptions); +} + /** * Set option defaults for monkey frontend * @@ -379,7 +384,12 @@ main(int argc, char **argv) ret = monkey_register_handler("WINDOW", monkey_window_handle_command); if (ret != NSERROR_OK) { - die("window handler fialed to register"); + die("window handler failed to register"); + } + + ret = monkey_register_handler("OPTIONS", monkey_options_handle_command); + if (ret != NSERROR_OK) { + die("options handler failed to register"); } fprintf(stdout, "GENERIC STARTED\n"); -- cgit v1.2.3