diff options
Diffstat (limited to 'linux-user/main.c')
-rw-r--r-- | linux-user/main.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 58d8d8dff5..31aa4d98e4 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4029,7 +4029,9 @@ static int parse_args(int argc, char **argv) if (!strcmp(r, arginfo->argv)) { if (arginfo->has_arg) { if (optind >= argc) { - usage(1); + (void) fprintf(stderr, + "qemu: missing argument for option '%s'\n", r); + exit(1); } arginfo->handle_opt(argv[optind]); optind++; @@ -4042,12 +4044,14 @@ static int parse_args(int argc, char **argv) /* no option matched the current argv */ if (arginfo->handle_opt == NULL) { - usage(1); + (void) fprintf(stderr, "qemu: unknown option '%s'\n", r); + exit(1); } } if (optind >= argc) { - usage(1); + (void) fprintf(stderr, "qemu: no user program specified\n"); + exit(1); } filename = argv[optind]; |