qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 10/15] vl: Make -machine $TYPE, help and -accel


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH 10/15] vl: Make -machine $TYPE, help and -accel help print to stdout
Date: Mon, 8 Apr 2019 11:44:44 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hi Markus,

On 4/8/19 11:36 AM, Markus Armbruster wrote:
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 <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
  vl.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/vl.c b/vl.c
index c696ad2a13..792ef36001 100644
--- a/vl.c
+++ b/vl.c
@@ -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);

Does the line above have an alignment issue?

Anyway,

Reviewed-by: Marcel Apfelbaum <address@hidden>

Thanks,
Marcel

          if (prop->description) {
-            error_printf(" (%s)\n", prop->description);
+            printf(" (%s)\n", prop->description);
          } else {
-            error_printf("\n");
+            printf("\n");
          }
      }
@@ -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,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]