diff mbox series

[16/16] vl: Don't continue after -smp help.

Message ID 20210720125408.387910-17-armbru@redhat.com
State New
Headers show
Series Various error handling fixes and cleanups | expand

Commit Message

Markus Armbruster July 20, 2021, 12:54 p.m. UTC
We continue after -smp help:

    $ qemu-system-x86_64 -smp help -display none -monitor stdio
    smp-opts options:
      cores=<num>
      cpus=<num>
      dies=<num>
      maxcpus=<num>
      sockets=<num>
      threads=<num>
    QEMU 6.0.50 monitor - type 'help' for more information
    (qemu)

Other options, such as -object help and -device help, don't.

Adjust -smp not to continue either.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 softmmu/vl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé July 20, 2021, 6:08 p.m. UTC | #1
On 7/20/21 2:54 PM, Markus Armbruster wrote:
> We continue after -smp help:
> 
>     $ qemu-system-x86_64 -smp help -display none -monitor stdio
>     smp-opts options:
>       cores=<num>
>       cpus=<num>
>       dies=<num>
>       maxcpus=<num>
>       sockets=<num>
>       threads=<num>
>     QEMU 6.0.50 monitor - type 'help' for more information
>     (qemu)
> 
> Other options, such as -object help and -device help, don't.
> 
> Adjust -smp not to continue either.
> 
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  softmmu/vl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index ce0ecc736b..8f9d97635a 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -1543,7 +1543,7 @@ machine_parse_property_opt(QemuOptsList *opts_list, const char *propname,
>      prop = keyval_parse(arg, opts_list->implied_opt_name, &help, &error_fatal);
>      if (help) {
>          qemu_opts_print_help(opts_list, true);
> -        return;
> +        exit(0);
>      }
>      opts = qdict_new();
>      qdict_put(opts, propname, prop);
> 

Easy one for 6.1.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Pankaj Gupta July 20, 2021, 9:57 p.m. UTC | #2
> We continue after -smp help:
>
>     $ qemu-system-x86_64 -smp help -display none -monitor stdio
>     smp-opts options:
>       cores=<num>
>       cpus=<num>
>       dies=<num>
>       maxcpus=<num>
>       sockets=<num>
>       threads=<num>
>     QEMU 6.0.50 monitor - type 'help' for more information
>     (qemu)
>
> Other options, such as -object help and -device help, don't.
>
> Adjust -smp not to continue either.
>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  softmmu/vl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index ce0ecc736b..8f9d97635a 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -1543,7 +1543,7 @@ machine_parse_property_opt(QemuOptsList *opts_list, const char *propname,
>      prop = keyval_parse(arg, opts_list->implied_opt_name, &help, &error_fatal);
>      if (help) {
>          qemu_opts_print_help(opts_list, true);
> -        return;
> +        exit(0);
>      }
>      opts = qdict_new();
>      qdict_put(opts, propname, prop);
> --

Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
diff mbox series

Patch

diff --git a/softmmu/vl.c b/softmmu/vl.c
index ce0ecc736b..8f9d97635a 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -1543,7 +1543,7 @@  machine_parse_property_opt(QemuOptsList *opts_list, const char *propname,
     prop = keyval_parse(arg, opts_list->implied_opt_name, &help, &error_fatal);
     if (help) {
         qemu_opts_print_help(opts_list, true);
-        return;
+        exit(0);
     }
     opts = qdict_new();
     qdict_put(opts, propname, prop);