26ba25
From b8370cda9a44259acaba5f1760c0c8e58d52faaa Mon Sep 17 00:00:00 2001
26ba25
From: Max Reitz <mreitz@redhat.com>
26ba25
Date: Mon, 18 Jun 2018 14:59:39 +0200
26ba25
Subject: [PATCH 066/268] qemu-option: Pull out "Supported options" print
26ba25
26ba25
RH-Author: Max Reitz <mreitz@redhat.com>
26ba25
Message-id: <20180618145943.4489-4-mreitz@redhat.com>
26ba25
Patchwork-id: 80756
26ba25
O-Subject: [RHV-7.6 qemu-kvm-rhev PATCH 3/7] qemu-option: Pull out "Supported options" print
26ba25
Bugzilla: 1537956
26ba25
RH-Acked-by: John Snow <jsnow@redhat.com>
26ba25
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
26ba25
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
26ba25
26ba25
It really is up to the caller to decide what this list of options means.
26ba25
26ba25
Signed-off-by: Max Reitz <mreitz@redhat.com>
26ba25
Reviewed-by: John Snow <jsnow@redhat.com>
26ba25
Reviewed-by: Eric Blake <eblake@redhat.com>
26ba25
Message-id: 20180509210023.20283-4-mreitz@redhat.com
26ba25
Signed-off-by: Max Reitz <mreitz@redhat.com>
26ba25
(cherry picked from commit 7f3fb00136aaec74df8132492d1f48b8e9840258)
26ba25
Signed-off-by: Max Reitz <mreitz@redhat.com>
26ba25
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
26ba25
---
26ba25
 qemu-img.c         | 1 +
26ba25
 util/qemu-option.c | 1 -
26ba25
 2 files changed, 1 insertion(+), 1 deletion(-)
26ba25
26ba25
diff --git a/qemu-img.c b/qemu-img.c
26ba25
index e40d6ff..cdeb01b 100644
26ba25
--- a/qemu-img.c
26ba25
+++ b/qemu-img.c
26ba25
@@ -261,6 +261,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
26ba25
         create_opts = qemu_opts_append(create_opts, proto_drv->create_opts);
26ba25
     }
26ba25
 
26ba25
+    printf("Supported options:\n");
26ba25
     qemu_opts_print_help(create_opts);
26ba25
     qemu_opts_free(create_opts);
26ba25
     return 0;
26ba25
diff --git a/util/qemu-option.c b/util/qemu-option.c
26ba25
index d0756fd..95e6cf4 100644
26ba25
--- a/util/qemu-option.c
26ba25
+++ b/util/qemu-option.c
26ba25
@@ -218,7 +218,6 @@ void qemu_opts_print_help(QemuOptsList *list)
26ba25
 
26ba25
     assert(list);
26ba25
     desc = list->desc;
26ba25
-    printf("Supported options:\n");
26ba25
     while (desc && desc->name) {
26ba25
         printf("%-16s %s\n", desc->name,
26ba25
                desc->help ? desc->help : "No description available");
26ba25
-- 
26ba25
1.8.3.1
26ba25