diff options
author | Max Reitz <mreitz@redhat.com> | 2019-04-13 17:20:37 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-04-30 15:29:00 +0200 |
commit | f4619af0c113a5f7434176d5f508b8a58c4d53d7 (patch) | |
tree | e9c23726f380f6ebf4a545b8ff5c9a2ea8f6d756 /qemu-img.c | |
parent | 0ef5a8e6ceb06205b96201b469748409a47f5b89 (diff) | |
download | qemu-f4619af0c113a5f7434176d5f508b8a58c4d53d7.zip qemu-f4619af0c113a5f7434176d5f508b8a58c4d53d7.tar.gz qemu-f4619af0c113a5f7434176d5f508b8a58c4d53d7.tar.bz2 |
qemu-img: Make create hint at protocol options
qemu-img create allows giving just a format and "-o help" to get a list
of the options supported by that format. Users may not realize that the
protocol level may offer even more options, which they only get to see
by specifying a filename.
This patch adds a note to hint at that fact.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -267,9 +267,20 @@ static int print_block_option_help(const char *filename, const char *fmt) create_opts = qemu_opts_append(create_opts, proto_drv->create_opts); } - printf("Supported options:\n"); + if (filename) { + printf("Supported options:\n"); + } else { + printf("Supported %s options:\n", fmt); + } qemu_opts_print_help(create_opts, false); qemu_opts_free(create_opts); + + if (!filename) { + printf("\n" + "The protocol level may support further options.\n" + "Specify the target filename to include those options.\n"); + } + return 0; } |