qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] command line error handling broken?
@ 2016-02-07 10:32 Michael S. Tsirkin
  2016-02-07 16:25 ` Marcel Apfelbaum
  2016-02-08  8:48 ` Laszlo Ersek
  0 siblings, 2 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2016-02-07 10:32 UTC (permalink / raw)
  To: Marcel Apfelbaum, qemu-devel; +Cc: Markus Armbruster, Eduardo Habkost

./x86_64-softmmu/qemu-system-x86_64 -M q35-1.5 -redir tcp:8022::22

qemu-system-x86_64: -redir tcp:8022::22: unsupported machine type
Use -machine help to list supported machines

It should say q35-1.5 is unsupported, of course.

Anyone knows what's going on?

-- 
MST

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] command line error handling broken?
  2016-02-07 10:32 [Qemu-devel] command line error handling broken? Michael S. Tsirkin
@ 2016-02-07 16:25 ` Marcel Apfelbaum
  2016-02-08  8:48 ` Laszlo Ersek
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Apfelbaum @ 2016-02-07 16:25 UTC (permalink / raw)
  To: Michael S. Tsirkin, Marcel Apfelbaum, qemu-devel
  Cc: Markus Armbruster, Eduardo Habkost

On 02/07/2016 12:32 PM, Michael S. Tsirkin wrote:
> ./x86_64-softmmu/qemu-system-x86_64 -M q35-1.5 -redir tcp:8022::22
>
> qemu-system-x86_64: -redir tcp:8022::22: unsupported machine type
> Use -machine help to list supported machines
>
> It should say q35-1.5 is unsupported, of course.
>
> Anyone knows what's going on?

Sent a patch to fix this: "vl.c: fixed regression of machine error message".

Thanks for reporting it,
Marcel

>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] command line error handling broken?
  2016-02-07 10:32 [Qemu-devel] command line error handling broken? Michael S. Tsirkin
  2016-02-07 16:25 ` Marcel Apfelbaum
@ 2016-02-08  8:48 ` Laszlo Ersek
  1 sibling, 0 replies; 3+ messages in thread
From: Laszlo Ersek @ 2016-02-08  8:48 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Markus Armbruster, qemu-devel, Eduardo Habkost, Marcel Apfelbaum

On 02/07/16 11:32, Michael S. Tsirkin wrote:
> ./x86_64-softmmu/qemu-system-x86_64 -M q35-1.5 -redir tcp:8022::22
> 
> qemu-system-x86_64: -redir tcp:8022::22: unsupported machine type
> Use -machine help to list supported machines
> 
> It should say q35-1.5 is unsupported, of course.
> 
> Anyone knows what's going on?
> 

Don't know what triggered it (and when), but the following should fix it:

> diff --git a/vl.c b/vl.c
> index c581e39..0830f98 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4031,7 +4031,12 @@ int main(int argc, char **argv, char **envp)
>      opts = qemu_get_machine_opts();
>      optarg = qemu_opt_get(opts, "type");
>      if (optarg) {
> +        Location loc;
> +
> +        loc_push_none(&loc);
> +        qemu_opts_loc_restore(opts);
>          machine_class = machine_parse(optarg);
> +        loc_pop(&loc);
>      }
>
>      if (machine_class == NULL) {

The problem is probably that the last location has moved farther due to
the option parsing loop, by the time we realize this error. So the
location should be restored for error reporting.

Thanks
Laszlo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-08  8:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-07 10:32 [Qemu-devel] command line error handling broken? Michael S. Tsirkin
2016-02-07 16:25 ` Marcel Apfelbaum
2016-02-08  8:48 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).