Revision 1386d4c0
b/linux-user/main.c | ||
---|---|---|
3084 | 3084 |
{ |
3085 | 3085 |
printf("qemu-" TARGET_ARCH " version " QEMU_VERSION QEMU_PKGVERSION |
3086 | 3086 |
", Copyright (c) 2003-2008 Fabrice Bellard\n"); |
3087 |
exit(0); |
|
3087 | 3088 |
} |
3088 | 3089 |
|
3089 | 3090 |
struct qemu_argument { |
... | ... | |
3129 | 3130 |
{"strace", "QEMU_STRACE", false, handle_arg_strace, |
3130 | 3131 |
"", "log system calls"}, |
3131 | 3132 |
{"version", "QEMU_VERSION", false, handle_arg_version, |
3132 |
"", "log system calls"},
|
|
3133 |
"", "display version information and exit"},
|
|
3133 | 3134 |
{NULL, NULL, false, NULL, NULL, NULL} |
3134 | 3135 |
}; |
3135 | 3136 |
|
... | ... | |
3231 | 3232 |
|
3232 | 3233 |
for (arginfo = arg_table; arginfo->handle_opt != NULL; arginfo++) { |
3233 | 3234 |
if (!strcmp(r, arginfo->argv)) { |
3234 |
if (optind >= argc) { |
|
3235 |
usage(); |
|
3236 |
} |
|
3237 |
|
|
3238 |
arginfo->handle_opt(argv[optind]); |
|
3239 |
|
|
3240 | 3235 |
if (arginfo->has_arg) { |
3236 |
if (optind >= argc) { |
|
3237 |
usage(); |
|
3238 |
} |
|
3239 |
arginfo->handle_opt(argv[optind]); |
|
3241 | 3240 |
optind++; |
3241 |
} else { |
|
3242 |
arginfo->handle_opt(NULL); |
|
3242 | 3243 |
} |
3243 |
|
|
3244 | 3244 |
break; |
3245 | 3245 |
} |
3246 | 3246 |
} |
... | ... | |
3276 | 3276 |
int i; |
3277 | 3277 |
int ret; |
3278 | 3278 |
|
3279 |
if (argc <= 1) |
|
3280 |
usage(); |
|
3281 |
|
|
3282 | 3279 |
qemu_cache_utils_init(envp); |
3283 | 3280 |
|
3284 | 3281 |
if ((envlist = envlist_create()) == NULL) { |
Also available in: Unified diff