aboutsummaryrefslogtreecommitdiff
path: root/block/vvfat.c
diff options
context:
space:
mode:
authorChunyan Liu <cyliu@suse.com>2014-06-05 17:21:11 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2014-06-16 17:23:21 +0800
commitc282e1fdf7ec9659c7f320123be397477a359d01 (patch)
tree4e76122536c52b1093da8647839039627d1f596c /block/vvfat.c
parentfec9921f0a331716c898d1f823682de2ecfa3d2a (diff)
cleanup QEMUOptionParameter
Now that all backend drivers are using QemuOpts, remove all QEMUOptionParameter related codes. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/vvfat.c')
-rw-r--r--block/vvfat.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/block/vvfat.c b/block/vvfat.c
index b1ab195334..70176b1619 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -2911,7 +2911,6 @@ static BlockDriver vvfat_write_target = {
static int enable_write_target(BDRVVVFATState *s, Error **errp)
{
BlockDriver *bdrv_qcow = NULL;
- QemuOptsList *create_opts = NULL;
QemuOpts *opts = NULL;
int ret;
int size = sector2cluster(s, s->sector_count);
@@ -2927,21 +2926,12 @@ static int enable_write_target(BDRVVVFATState *s, Error **errp)
}
bdrv_qcow = bdrv_find_format("qcow");
- assert(!(bdrv_qcow->create_opts && bdrv_qcow->create_options));
- if (bdrv_qcow->create_options) {
- create_opts = params_to_opts(bdrv_qcow->create_options);
- } else {
- create_opts = bdrv_qcow->create_opts;
- }
- opts = qemu_opts_create(create_opts, NULL, 0, &error_abort);
+ opts = qemu_opts_create(bdrv_qcow->create_opts, NULL, 0, &error_abort);
qemu_opt_set_number(opts, BLOCK_OPT_SIZE, s->sector_count * 512);
qemu_opt_set(opts, BLOCK_OPT_BACKING_FILE, "fat:");
- ret = bdrv_create(bdrv_qcow, s->qcow_filename, NULL, opts, errp);
+ ret = bdrv_create(bdrv_qcow, s->qcow_filename, opts, errp);
qemu_opts_del(opts);
- if (bdrv_qcow->create_options) {
- qemu_opts_free(create_opts);
- }
if (ret < 0) {
goto err;
}