Skip to content

Commit

Permalink
vl: Make -machine $TYPE,help and -accel help print to stdout
Browse files Browse the repository at this point in the history
Command line help help explicitly requested by the user should be
printed to stdout, not stderr.  We do elsewhere.  Adjust -machine
$TYPE,help and -accel help to match: use printf() instead of
error_printf().

Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <20190417190641.26814-10-armbru@redhat.com>
  • Loading branch information
Markus Armbruster committed Apr 18, 2019
1 parent 5ab77f9 commit 26eaf2c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vl.c
Expand Up @@ -1556,12 +1556,12 @@ static int machine_help_func(QemuOpts *opts, MachineState *machine)
continue;
}

error_printf("%s.%s=%s", MACHINE_GET_CLASS(machine)->name,
prop->name, prop->type);
printf("%s.%s=%s", MACHINE_GET_CLASS(machine)->name,
prop->name, prop->type);
if (prop->description) {
error_printf(" (%s)\n", prop->description);
printf(" (%s)\n", prop->description);
} else {
error_printf("\n");
printf("\n");
}
}

Expand Down Expand Up @@ -3643,7 +3643,7 @@ int main(int argc, char **argv, char **envp)
optarg, true);
optarg = qemu_opt_get(accel_opts, "accel");
if (!optarg || is_help_option(optarg)) {
error_printf("Possible accelerators: kvm, xen, hax, tcg\n");
printf("Possible accelerators: kvm, xen, hax, tcg\n");
exit(0);
}
opts = qemu_opts_create(qemu_find_opts("machine"), NULL,
Expand Down

0 comments on commit 26eaf2c

Please sign in to comment.