command line error handling broken?
./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?
Signature · 1 line
MST
Quoted 8 lines · Michael S. Tsirkin
./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
Quoted 1 line
Quoted 9 lines · Michael S. Tsirkin
./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:
Quoted 7 lines
vl.c +0
-0@@ -4031,7 +4031,12 @@ int main(int argc, char **argv, char **envp) opts =qemu_get_machine_opts (); optarg =qemu_opt_get (opts,"type" );
vl.c int main(int argc, char **argv, char **envp) · line 4042
Quoted 10 lines
vl.c +5
-0if (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