diff options
author | Chunyan Liu <cyliu@suse.com> | 2014-06-05 17:20:47 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-06-16 17:23:20 +0800 |
commit | 504189a96fdee5916073858f0e60f33e0275454a (patch) | |
tree | f7713e64cafe4a089cdfad7facb7c0f76a74d4c8 /util | |
parent | 782730b0bcde44eef8eb5b2d4200eff318ec77cd (diff) | |
download | qemu-504189a96fdee5916073858f0e60f33e0275454a.tar.gz qemu-504189a96fdee5916073858f0e60f33e0275454a.tar.bz2 qemu-504189a96fdee5916073858f0e60f33e0275454a.zip |
QemuOpts: add qemu_opts_print_help to replace print_option_help
print_option_help takes QEMUOptionParameter as parameter, add
qemu_opts_print_help to take QemuOptsList as parameter for later
replace work.
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Leandro Dorileo <l@dorileo.org>
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Chunyan Liu <cyliu@suse.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/qemu-option.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/util/qemu-option.c b/util/qemu-option.c index a7330c6321..cd03eb43c4 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -553,6 +553,19 @@ void print_option_help(QEMUOptionParameter *list) } } +void qemu_opts_print_help(QemuOptsList *list) +{ + QemuOptDesc *desc; + + assert(list); + desc = list->desc; + printf("Supported options:\n"); + while (desc && desc->name) { + printf("%-16s %s\n", desc->name, + desc->help ? desc->help : "No description available"); + desc++; + } +} /* ------------------------------------------------------------------ */ static QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name) |