aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.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 /qemu-img.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 'qemu-img.c')
-rw-r--r--qemu-img.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 8acdcca8bf..c98896b281 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -280,8 +280,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
return 1;
}
- create_opts = qemu_opts_append(create_opts, drv->create_opts,
- drv->create_options);
+ create_opts = qemu_opts_append(create_opts, drv->create_opts);
if (filename) {
proto_drv = bdrv_find_protocol(filename, true);
if (!proto_drv) {
@@ -289,8 +288,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
qemu_opts_free(create_opts);
return 1;
}
- create_opts = qemu_opts_append(create_opts, proto_drv->create_opts,
- proto_drv->create_options);
+ create_opts = qemu_opts_append(create_opts, proto_drv->create_opts);
}
qemu_opts_print_help(create_opts);
@@ -1381,10 +1379,8 @@ static int img_convert(int argc, char **argv)
goto out;
}
- create_opts = qemu_opts_append(create_opts, drv->create_opts,
- drv->create_options);
- create_opts = qemu_opts_append(create_opts, proto_drv->create_opts,
- proto_drv->create_options);
+ create_opts = qemu_opts_append(create_opts, drv->create_opts);
+ create_opts = qemu_opts_append(create_opts, proto_drv->create_opts);
opts = qemu_opts_create(create_opts, NULL, 0, &error_abort);
if (options && qemu_opts_do_parse(opts, options, NULL)) {
@@ -1437,7 +1433,7 @@ static int img_convert(int argc, char **argv)
if (!skip_create) {
/* Create the new image */
- ret = bdrv_create(drv, out_filename, NULL, opts, &local_err);
+ ret = bdrv_create(drv, out_filename, opts, &local_err);
if (ret < 0) {
error_report("%s: error while converting %s: %s",
out_filename, out_fmt, error_get_pretty(local_err));
@@ -2766,8 +2762,7 @@ static int img_amend(int argc, char **argv)
goto out;
}
- create_opts = qemu_opts_append(create_opts, bs->drv->create_opts,
- bs->drv->create_options);
+ create_opts = qemu_opts_append(create_opts, bs->drv->create_opts);
opts = qemu_opts_create(create_opts, NULL, 0, &error_abort);
if (options && qemu_opts_do_parse(opts, options, NULL)) {
error_report("Invalid options for file format '%s'", fmt);
@@ -2775,7 +2770,7 @@ static int img_amend(int argc, char **argv)
goto out;
}
- ret = bdrv_amend_options(bs, NULL, opts);
+ ret = bdrv_amend_options(bs, opts);
if (ret < 0) {
error_report("Error while amending options: %s", strerror(-ret));
goto out;