aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-10-27 13:30:08 +0100
committerKevin Wolf <kwolf@redhat.com>2014-11-06 12:45:47 +0100
commite56934becea70817124be1534f4289ce7d8f6733 (patch)
tree2afdd6ed61742540f0eedbd310717752c3550e14 /block.c
parentcc4d3ee43584d1441e8ff6b994684cc9a8d8f2b4 (diff)
block: Propagate error in bdrv_img_create()
If the specified backing file could not be opened, do not generate a new error message which contains the message which has been generated by bdrv_open(), but just propagate the latter. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/block.c b/block.c
index dacd8815d3..4b5735ca9a 100644
--- a/block.c
+++ b/block.c
@@ -5608,11 +5608,6 @@ void bdrv_img_create(const char *filename, const char *fmt,
ret = bdrv_open(&bs, backing_file, NULL, NULL, back_flags,
backing_drv, &local_err);
if (ret < 0) {
- error_setg_errno(errp, -ret, "Could not open '%s': %s",
- backing_file,
- error_get_pretty(local_err));
- error_free(local_err);
- local_err = NULL;
goto out;
}
size = bdrv_getlength(bs);