From 504189a96fdee5916073858f0e60f33e0275454a Mon Sep 17 00:00:00 2001 From: Chunyan Liu Date: Thu, 5 Jun 2014 17:20:47 +0800 Subject: 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 Reviewed-by: Leandro Dorileo Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu Signed-off-by: Stefan Hajnoczi --- util/qemu-option.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'util') 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) -- cgit v1.2.1