diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-05-31 15:01:46 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-06-08 11:56:40 +0200 |
commit | 99cce9fa4e091fd7ead1926e1c0db016ef293f36 (patch) | |
tree | e38c8c5675a9ab2c5a8e51f6c614decaaadb1aeb /block/qcow2.c | |
parent | d220894e025ea85d604a2cdc1eef541ed516728e (diff) |
qemu-img create: Fix displayed default cluster size
When not specifying a cluster size on the command line, qemu-img printed
a cluster size of 0:
Formatting '/tmp/test.qcow2', fmt=qcow2 size=67108864
encryption=off cluster_size=0
This patch adds the default cluster size to the QEMUOptionParameter list, so
that it displays the default value that is used.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index db1931b95b..8451ded9a3 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1036,7 +1036,7 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options) const char *backing_fmt = NULL; uint64_t sectors = 0; int flags = 0; - size_t cluster_size = 65536; + size_t cluster_size = DEFAULT_CLUSTER_SIZE; int prealloc = 0; /* Read out options */ @@ -1343,7 +1343,8 @@ static QEMUOptionParameter qcow2_create_options[] = { { .name = BLOCK_OPT_CLUSTER_SIZE, .type = OPT_SIZE, - .help = "qcow2 cluster size" + .help = "qcow2 cluster size", + .value = { .n = DEFAULT_CLUSTER_SIZE }, }, { .name = BLOCK_OPT_PREALLOC, |