rots-utils: fix options
This commit is contained in:
parent
33d6268295
commit
9393b957b4
1 changed files with 5 additions and 2 deletions
|
@ -35,15 +35,18 @@ static int parse_args(struct args *args, int argc, char *argv[])
|
|||
};
|
||||
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) {
|
||||
switch (ret) {
|
||||
case OPTION_HELP: return -1;
|
||||
case OPTION_IMAGE: args->image = optarg; break;
|
||||
default: break;
|
||||
default: return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!args->image)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue