Skip to content

Commit

Permalink
Add --help option to fix manpage generation
Browse files Browse the repository at this point in the history
This fixes #57.
  • Loading branch information
fhunleth committed Feb 21, 2017
1 parent 7075b02 commit ce97c0f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/fwup.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ static struct option long_options[] = {
{"no-eject", no_argument, 0, '#'},
{"framing", no_argument, 0, 'F'},
{"gen-keys", no_argument, 0, 'g'},
{"help", no_argument, 0, '?'},
{"list", no_argument, 0, 'l'},
{"metadata", no_argument, 0, 'm'},
{"progress-low", required_argument, 0, '$'},
Expand Down Expand Up @@ -295,7 +296,7 @@ int main(int argc, char **argv)
atexit(mmc_finalize);

int opt;
while ((opt = getopt_long(argc, argv, "acd:DEf:Fgi:lmno:p:qSs:t:VvUuyz123456789", long_options, NULL)) != -1) {
while ((opt = getopt_long(argc, argv, "acd:DEf:Fgi:lmno:p:qSs:t:VvUuyz123456789?", long_options, NULL)) != -1) {
switch (opt) {
case 'a': // --apply
command = CMD_APPLY;
Expand Down Expand Up @@ -408,7 +409,9 @@ int main(int argc, char **argv)
case '9':
compression_level = opt - '0';
break;
default: /* '?' */

case '?':
default:
print_usage();
exit(EXIT_FAILURE);
}
Expand Down

0 comments on commit ce97c0f

Please sign in to comment.