Adding --help option to flterm.

This commit is contained in:
Tim 'mithro' Ansell 2015-09-20 23:09:16 +10:00 committed by Sebastien Bourdeauducq
parent 31956de790
commit bc1450e4f2
1 changed files with 10 additions and 1 deletions

View File

@ -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;
}
}