Skip to content

Commit

Permalink
Adding --help option to flterm.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro authored and sbourdeauducq committed Sep 21, 2015
1 parent 31956de commit bc1450e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tools/flterm.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ enum {
OPTION_CMDLINEADR,
OPTION_INITRD,
OPTION_INITRDADR,
OPTION_LOG
OPTION_LOG,
OPTION_HELP,
};

static const struct option options[] = {
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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;
}
}

Expand Down

0 comments on commit bc1450e

Please sign in to comment.