diff options
author | Kevin Wolf <kwolf@redhat.com> | 2009-06-04 15:39:38 +0200 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-06-06 18:38:57 +0300 |
commit | db08adf526ce78eea7ae5f24e30b8caa1af4cf24 (patch) | |
tree | c52baf3aed5286724a6114327f2532bad99ef4bb /block | |
parent | f425c278724fc477735a0eecd2e2b03e53fd1a62 (diff) | |
download | qemu-db08adf526ce78eea7ae5f24e30b8caa1af4cf24.zip qemu-db08adf526ce78eea7ae5f24e30b8caa1af4cf24.tar.gz qemu-db08adf526ce78eea7ae5f24e30b8caa1af4cf24.tar.bz2 |
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 <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/cow.c | 12 | ||||
-rw-r--r-- | block/qcow.c | 18 | ||||
-rw-r--r-- | block/qcow2.c | 30 | ||||
-rw-r--r-- | block/raw-posix.c | 6 | ||||
-rw-r--r-- | block/raw-win32.c | 6 | ||||
-rw-r--r-- | block/vmdk.c | 18 | ||||
-rw-r--r-- | block/vpc.c | 6 |
7 files changed, 80 insertions, 16 deletions
diff --git a/block/cow.c b/block/cow.c index 41d292a..84818f1 100644 --- a/block/cow.c +++ b/block/cow.c @@ -262,8 +262,16 @@ static void cow_flush(BlockDriverState *bs) } static QEMUOptionParameter cow_create_options[] = { - { BLOCK_OPT_SIZE, OPT_SIZE }, - { BLOCK_OPT_BACKING_FILE, OPT_STRING }, + { + .name = BLOCK_OPT_SIZE, + .type = OPT_SIZE, + .help = "Virtual disk size" + }, + { + .name = BLOCK_OPT_BACKING_FILE, + .type = OPT_STRING, + .help = "File name of a base image" + }, { NULL } }; diff --git a/block/qcow.c b/block/qcow.c index 329b364..55a68a6 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -909,9 +909,21 @@ static int qcow_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) static QEMUOptionParameter qcow_create_options[] = { - { BLOCK_OPT_SIZE, OPT_SIZE }, - { BLOCK_OPT_BACKING_FILE, OPT_STRING }, - { BLOCK_OPT_ENCRYPT, OPT_FLAG }, + { + .name = BLOCK_OPT_SIZE, + .type = OPT_SIZE, + .help = "Virtual disk size" + }, + { + .name = BLOCK_OPT_BACKING_FILE, + .type = OPT_STRING, + .help = "File name of a base image" + }, + { + .name = BLOCK_OPT_ENCRYPT, + .type = OPT_FLAG, + .help = "Encrypt the image" + }, { NULL } }; diff --git a/block/qcow2.c b/block/qcow2.c index d1611d1..c2be42e 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2981,11 +2981,31 @@ static int qcow_get_buffer(BlockDriverState *bs, uint8_t *buf, } static QEMUOptionParameter qcow_create_options[] = { - { BLOCK_OPT_SIZE, OPT_SIZE }, - { BLOCK_OPT_BACKING_FILE, OPT_STRING }, - { BLOCK_OPT_BACKING_FMT, OPT_STRING }, - { BLOCK_OPT_ENCRYPT, OPT_FLAG }, - { BLOCK_OPT_CLUSTER_SIZE, OPT_SIZE }, + { + .name = BLOCK_OPT_SIZE, + .type = OPT_SIZE, + .help = "Virtual disk size" + }, + { + .name = BLOCK_OPT_BACKING_FILE, + .type = OPT_STRING, + .help = "File name of a base image" + }, + { + .name = BLOCK_OPT_BACKING_FMT, + .type = OPT_STRING, + .help = "Image format of the base image" + }, + { + .name = BLOCK_OPT_ENCRYPT, + .type = OPT_FLAG, + .help = "Encrypt the image" + }, + { + .name = BLOCK_OPT_CLUSTER_SIZE, + .type = OPT_SIZE, + .help = "qcow2 cluster size" + }, { NULL } }; diff --git a/block/raw-posix.c b/block/raw-posix.c index 38c4aa7..4798d62 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -858,7 +858,11 @@ static void raw_flush(BlockDriverState *bs) static QEMUOptionParameter raw_create_options[] = { - { BLOCK_OPT_SIZE, OPT_SIZE }, + { + .name = BLOCK_OPT_SIZE, + .type = OPT_SIZE, + .help = "Virtual disk size" + }, { NULL } }; diff --git a/block/raw-win32.c b/block/raw-win32.c index 6e5c09b..1e95153 100644 --- a/block/raw-win32.c +++ b/block/raw-win32.c @@ -234,7 +234,11 @@ static int raw_create(const char *filename, QEMUOptionParameter *options) } static QEMUOptionParameter raw_create_options[] = { - { BLOCK_OPT_SIZE, OPT_SIZE }, + { + .name = BLOCK_OPT_SIZE, + .type = OPT_SIZE, + .help = "Virtual disk size" + }, { NULL } }; diff --git a/block/vmdk.c b/block/vmdk.c index b3ea686..f21f02b 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -828,9 +828,21 @@ static void vmdk_flush(BlockDriverState *bs) static QEMUOptionParameter vmdk_create_options[] = { - { BLOCK_OPT_SIZE, OPT_SIZE }, - { BLOCK_OPT_BACKING_FILE, OPT_STRING }, - { BLOCK_OPT_COMPAT6, OPT_FLAG }, + { + .name = BLOCK_OPT_SIZE, + .type = OPT_SIZE, + .help = "Virtual disk size" + }, + { + .name = BLOCK_OPT_BACKING_FILE, + .type = OPT_STRING, + .help = "File name of a base image" + }, + { + .name = BLOCK_OPT_COMPAT6, + .type = OPT_FLAG, + .help = "VMDK version 6 image" + }, { NULL } }; diff --git a/block/vpc.c b/block/vpc.c index 662a6f6..ba482e9 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -594,7 +594,11 @@ static void vpc_close(BlockDriverState *bs) } static QEMUOptionParameter vpc_create_options[] = { - { "size", OPT_SIZE }, + { + .name = BLOCK_OPT_SIZE, + .type = OPT_SIZE, + .help = "Virtual disk size" + }, { NULL } }; |