From: Tim 'mithro' Ansell Date: Sun, 20 Sep 2015 13:09:16 +0000 (+1000) Subject: Adding --help option to flterm. X-Git-Tag: 24jan2021_ls180~2116 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc1450e4f2a5a30cc536898614e5b610be3c8793;p=litex.git Adding --help option to flterm. --- 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; } }