diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2014-01-01 18:49:17 -0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-01-06 15:02:30 -0500 |
commit | 87ea75d5e135c0527c6a9dbac4317913409f28c7 (patch) | |
tree | ad01b184d1a7e79e87139bd73da3b1e84dadf990 /block | |
parent | 00b810532446b1037aa5d299f181ac4d1d65aa9c (diff) |
qemu-option: Remove qemu_opts_create_nofail
This is a boiler-plate _nofail variant of qemu_opts_create. Remove and
use error_abort in call sites.
null/0 arguments needs to be added for the id and fail_if_exists fields
in affected callsites due to argument inconsistency between the normal and
no_fail variants.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blkdebug.c | 2 | ||||
-rw-r--r-- | block/blkverify.c | 2 | ||||
-rw-r--r-- | block/curl.c | 2 | ||||
-rw-r--r-- | block/gluster.c | 2 | ||||
-rw-r--r-- | block/iscsi.c | 2 | ||||
-rw-r--r-- | block/nbd.c | 3 | ||||
-rw-r--r-- | block/qcow2.c | 2 | ||||
-rw-r--r-- | block/raw-posix.c | 2 | ||||
-rw-r--r-- | block/raw-win32.c | 5 | ||||
-rw-r--r-- | block/rbd.c | 2 | ||||
-rw-r--r-- | block/sheepdog.c | 2 | ||||
-rw-r--r-- | block/vvfat.c | 2 |
12 files changed, 15 insertions, 13 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c index 957be2c76b..ebc5f13464 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -359,7 +359,7 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags, const char *filename, *config; int ret; - opts = qemu_opts_create_nofail(&runtime_opts); + opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { error_propagate(errp, local_err); diff --git a/block/blkverify.c b/block/blkverify.c index 3c6352898f..1c1637f55e 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -125,7 +125,7 @@ static int blkverify_open(BlockDriverState *bs, QDict *options, int flags, const char *filename, *raw; int ret; - opts = qemu_opts_create_nofail(&runtime_opts); + opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { error_propagate(errp, local_err); diff --git a/block/curl.c b/block/curl.c index 5a46f9707c..a6039366da 100644 --- a/block/curl.c +++ b/block/curl.c @@ -413,7 +413,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags, return -EROFS; } - opts = qemu_opts_create_nofail(&runtime_opts); + opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { qerror_report_err(local_err); diff --git a/block/gluster.c b/block/gluster.c index 877686a7fe..563d497dc2 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -298,7 +298,7 @@ static int qemu_gluster_open(BlockDriverState *bs, QDict *options, Error *local_err = NULL; const char *filename; - opts = qemu_opts_create_nofail(&runtime_opts); + opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { qerror_report_err(local_err); diff --git a/block/iscsi.c b/block/iscsi.c index fa69408df9..02eba5d14f 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1109,7 +1109,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags, return -EINVAL; } - opts = qemu_opts_create_nofail(&runtime_opts); + opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { qerror_report_err(local_err); diff --git a/block/nbd.c b/block/nbd.c index 4455a134db..327e913002 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -205,7 +205,8 @@ static int nbd_config(BDRVNBDState *s, QDict *options, char **export) return -EINVAL; } - s->socket_opts = qemu_opts_create_nofail(&socket_optslist); + s->socket_opts = qemu_opts_create(&socket_optslist, NULL, 0, + &error_abort); qemu_opts_absorb_qdict(s->socket_opts, options, &local_err); if (error_is_set(&local_err)) { diff --git a/block/qcow2.c b/block/qcow2.c index f29aa88671..8ec9db10f8 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -669,7 +669,7 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags, } /* Enable lazy_refcounts according to image and command line options */ - opts = qemu_opts_create_nofail(&qcow2_runtime_opts); + opts = qemu_opts_create(&qcow2_runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { error_propagate(errp, local_err); diff --git a/block/raw-posix.c b/block/raw-posix.c index 10c6b34ba9..0676037e13 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -287,7 +287,7 @@ static int raw_open_common(BlockDriverState *bs, QDict *options, int fd, ret; struct stat st; - opts = qemu_opts_create_nofail(&raw_runtime_opts); + opts = qemu_opts_create(&raw_runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { error_propagate(errp, local_err); diff --git a/block/raw-win32.c b/block/raw-win32.c index 2bad5a39b4..ce314fd54f 100644 --- a/block/raw-win32.c +++ b/block/raw-win32.c @@ -248,7 +248,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags, s->type = FTYPE_FILE; - opts = qemu_opts_create_nofail(&raw_runtime_opts); + opts = qemu_opts_create(&raw_runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { error_propagate(errp, local_err); @@ -550,7 +550,8 @@ static int hdev_open(BlockDriverState *bs, QDict *options, int flags, Error *local_err = NULL; const char *filename; - QemuOpts *opts = qemu_opts_create_nofail(&raw_runtime_opts); + QemuOpts *opts = qemu_opts_create(&raw_runtime_opts, NULL, 0, + &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { error_propagate(errp, local_err); diff --git a/block/rbd.c b/block/rbd.c index 4a1ea5b5ce..f453f04757 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -461,7 +461,7 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags, const char *filename; int r; - opts = qemu_opts_create_nofail(&runtime_opts); + opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { qerror_report_err(local_err); diff --git a/block/sheepdog.c b/block/sheepdog.c index d1c812df3d..5ce0658111 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -1383,7 +1383,7 @@ static int sd_open(BlockDriverState *bs, QDict *options, int flags, s->bs = bs; - opts = qemu_opts_create_nofail(&runtime_opts); + opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { qerror_report_err(local_err); diff --git a/block/vvfat.c b/block/vvfat.c index 1abb8ad8e4..664941c560 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -1083,7 +1083,7 @@ DLOG(if (stderr == NULL) { setbuf(stderr, NULL); }) - opts = qemu_opts_create_nofail(&runtime_opts); + opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { qerror_report_err(local_err); |