aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-02-20 12:04:02 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-02-20 12:10:23 +0000
commit4c0c9bbe78901a706497a8fa1a27935bafc20cf7 (patch)
tree43fe900e8e748606dcdb0ef22d10068cc4608aaa /block.c
parent46eef33b89e936ca793e13c4aeea1414e97e8dbb (diff)
parent1094fd3a6219923c8d1abfc7dee5af996a181e7a (diff)
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp: monitor: Add object_add class argument completion. monitor: Add object_del id argument completion. monitor: Add device_add device argument completion. monitor: Add device_del id argument completion. qmp: expose list of supported character device backends Use error_is_set() only when necessary QMP: allow JSON dict arguments in qmp-shell hmp: migrate command (without -d) now blocks correctly Conflicts: blockdev.c [PMM: resolved trivial conflict in blockdev.c] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block.c')
-rw-r--r--block.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/block.c b/block.c
index 8f718f9f29..6f4bacaa58 100644
--- a/block.c
+++ b/block.c
@@ -421,7 +421,7 @@ static void coroutine_fn bdrv_create_co_entry(void *opaque)
assert(cco->drv);
ret = cco->drv->bdrv_create(cco->filename, cco->options, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(&cco->err, local_err);
}
cco->ret = ret;
@@ -460,7 +460,7 @@ int bdrv_create(BlockDriver *drv, const char* filename,
ret = cco.ret;
if (ret < 0) {
- if (error_is_set(&cco.err)) {
+ if (cco.err) {
error_propagate(errp, cco.err);
} else {
error_setg_errno(errp, -ret, "Could not create image");
@@ -486,7 +486,7 @@ int bdrv_create_file(const char* filename, QEMUOptionParameter *options,
}
ret = bdrv_create(drv, filename, options, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
}
return ret;
@@ -916,7 +916,7 @@ static int bdrv_open_common(BlockDriverState *bs, BlockDriverState *file,
}
if (ret < 0) {
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
} else if (bs->filename[0]) {
error_setg_errno(errp, -ret, "Could not open '%s'", bs->filename);
@@ -1037,7 +1037,7 @@ int bdrv_file_open(BlockDriverState **pbs, const char *filename,
/* Parse the filename and open it */
if (drv->bdrv_parse_filename && filename) {
drv->bdrv_parse_filename(filename, options, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
ret = -EINVAL;
goto fail;
@@ -1406,7 +1406,7 @@ fail:
QDECREF(bs->options);
QDECREF(options);
bs->options = NULL;
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
}
return ret;
@@ -1414,7 +1414,7 @@ fail:
close_and_fail:
bdrv_close(bs);
QDECREF(options);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
}
return ret;
@@ -5340,7 +5340,7 @@ out:
free_option_parameters(create_options);
free_option_parameters(param);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
}
}