aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2009-06-04 15:39:38 +0200
committerBlue Swirl <blauwirbel@gmail.com>2009-06-06 18:38:57 +0300
commitdb08adf526ce78eea7ae5f24e30b8caa1af4cf24 (patch)
treec52baf3aed5286724a6114327f2532bad99ef4bb /block/qcow2.c
parentf425c278724fc477735a0eecd2e2b03e53fd1a62 (diff)
downloadqemu-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/qcow2.c')
-rw-r--r--block/qcow2.c30
1 files changed, 25 insertions, 5 deletions
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 }
};