rots-utils: fix options

master
S.J.R. van Schaik 7 years ago
parent 33d6268295
commit 9393b957b4
  1. 7
      source/info.c

@ -35,15 +35,18 @@ static int parse_args(struct args *args, int argc, char *argv[])
}; };
int ret; int ret;
while ((ret = getopt_long(argc, (char * const *)argv, "hi:d:k:", options, while ((ret = getopt_long(argc, (char * const *)argv, "hi:", options,
NULL)) >= 0) { NULL)) >= 0) {
switch (ret) { switch (ret) {
case OPTION_HELP: return -1; case OPTION_HELP: return -1;
case OPTION_IMAGE: args->image = optarg; break; case OPTION_IMAGE: args->image = optarg; break;
default: break; default: return -1;
} }
} }
if (!args->image)
return -1;
return 0; return 0;
} }

Loading…
Cancel
Save