From bc1450e4f2a5a30cc536898614e5b610be3c8793 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Sun, 20 Sep 2015 23:09:16 +1000 Subject: [PATCH] Adding --help option to flterm. --- tools/flterm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/flterm.c b/tools/flterm.c index 2a1c7107..17d28a2e 100644 --- a/tools/flterm.c +++ b/tools/flterm.c @@ -579,7 +579,8 @@ enum { OPTION_CMDLINEADR, OPTION_INITRD, OPTION_INITRDADR, - OPTION_LOG + OPTION_LOG, + OPTION_HELP, }; static const struct option options[] = { @@ -638,6 +639,11 @@ static const struct option options[] = { .has_arg = 1, .val = OPTION_LOG }, + { + .name = "help", + .has_arg = 0, + .val = OPTION_HELP + }, { .name = NULL } @@ -753,6 +759,9 @@ int main(int argc, char *argv[]) free(log_path); log_path = strdup(optarg); break; + case OPTION_HELP: + print_usage(); + return 0; } } -- 2.30.2