From db08adf526ce78eea7ae5f24e30b8caa1af4cf24 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 4 Jun 2009 15:39:38 +0200 Subject: qemu-img: Print available options with -o ? This patch adds a small help text to each of the options in the block drivers which can be displayed by using qemu-img create -f fmt -o ? Signed-off-by: Kevin Wolf --- qemu-option.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'qemu-option.c') diff --git a/qemu-option.c b/qemu-option.c index 3cebdd51e..646bbad00 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -347,3 +347,16 @@ void print_option_parameters(QEMUOptionParameter *list) list++; } } + +/* + * Prints an overview of all available options + */ +void print_option_help(QEMUOptionParameter *list) +{ + printf("Supported options:\n"); + while (list && list->name) { + printf("%-16s %s\n", list->name, + list->help ? list->help : "No description available"); + list++; + } +} -- cgit v1.2.3