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