diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-04-28 11:50:30 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-04-28 11:50:31 +0100 |
commit | a41b2c995b52b2ce26c171c52ac7dc11c7dccd99 (patch) | |
tree | 63d44a2ccd30e219c4b10edc2b7fbb5f226a8756 /block | |
parent | d09a18d44d5bc0db10caa97cdd22c70e65adfe01 (diff) | |
parent | 172fc4dd33e604dcf868c28e73398c19e161708b (diff) |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Block pull request
# gpg: Signature made Fri 25 Apr 2014 17:05:13 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
* remotes/stefanha/tags/block-pull-request:
iscsi: Don't use error_is_set() to suppress additional errors
blockdev: Clean up fragile use of error_is_set()
nbd: Use return values instead of error_is_set(errp)
qemu-img: Consistently name Error * objects err, and not errp
Use error_is_set() only when necessary (again)
block: Expose host_* drivers in blockdev-add
MAINTAINERS: Add qemu-img/io to block subsystem
qemu-iotests: Improve and make use of QMPTestCase.wait_until_completed()
doc: add -drive rerror=,werror= to qemu --help output
block: Prevent coroutine stack overflow when recursing in bdrv_open_backing_file.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/iscsi.c | 9 | ||||
-rw-r--r-- | block/mirror.c | 2 | ||||
-rw-r--r-- | block/nbd.c | 2 | ||||
-rw-r--r-- | block/nfs.c | 2 | ||||
-rw-r--r-- | block/quorum.c | 4 |
5 files changed, 9 insertions, 10 deletions
diff --git a/block/iscsi.c b/block/iscsi.c index a636ea4f53..a30202b4fe 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1095,16 +1095,15 @@ static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun, *inq = scsi_datain_unmarshall(task); if (*inq == NULL) { error_setg(errp, "iSCSI: failed to unmarshall inquiry datain blob"); - goto fail; + goto fail_with_err; } return task; fail: - if (!error_is_set(errp)) { - error_setg(errp, "iSCSI: Inquiry command failed : %s", - iscsi_get_error(iscsi)); - } + error_setg(errp, "iSCSI: Inquiry command failed : %s", + iscsi_get_error(iscsi)); +fail_with_err: if (task != NULL) { scsi_free_scsi_task(task); } diff --git a/block/mirror.c b/block/mirror.c index 2618c3763c..36f4f8e8bd 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -680,7 +680,7 @@ void commit_active_start(BlockDriverState *bs, BlockDriverState *base, mirror_start_job(bs, base, speed, 0, 0, on_error, on_error, cb, opaque, &local_err, &commit_active_job_driver, false, base); - if (error_is_set(&local_err)) { + if (local_err) { error_propagate(errp, local_err); goto error_restore_flags; } diff --git a/block/nbd.c b/block/nbd.c index 55124239df..613f2581ae 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -175,7 +175,7 @@ static void nbd_parse_filename(const char *filename, QDict *options, InetSocketAddress *addr = NULL; addr = inet_parse(host_spec, errp); - if (error_is_set(errp)) { + if (!addr) { goto out; } diff --git a/block/nfs.c b/block/nfs.c index 98aa363e48..9fa831f160 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -343,7 +343,7 @@ static int nfs_file_open(BlockDriverState *bs, QDict *options, int flags, opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); - if (error_is_set(&local_err)) { + if (local_err) { error_propagate(errp, local_err); return -EINVAL; } diff --git a/block/quorum.c b/block/quorum.c index 7f580a83b5..ecec3a5407 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -753,7 +753,7 @@ static int quorum_open(BlockDriverState *bs, QDict *options, int flags, opts = qemu_opts_create(&quorum_runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); - if (error_is_set(&local_err)) { + if (local_err) { ret = -EINVAL; goto exit; } @@ -828,7 +828,7 @@ close_exit: g_free(opened); exit: /* propagate error */ - if (error_is_set(&local_err)) { + if (local_err) { error_propagate(errp, local_err); } QDECREF(list); |