From 3b439999998f800a1a09d6bb779e9f3eef4f1eb9 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Wed, 22 Jul 2015 16:24:56 +0200 Subject: [PATCH 4/5] block: Propagate error in bdrv_img_create() Message-id: <1437582297-9244-3-git-send-email-mreitz@redhat.com> Patchwork-id: 67107 O-Subject: [RHEL-7.2 qemu-kvm PATCH 2/3] block: Propagate error in bdrv_img_create() Bugzilla: 1238639 RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Miroslav Rezanina RH-Acked-by: Kevin Wolf RH-Acked-by: Fam Zheng 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 Reviewed-by: Kevin Wolf Reviewed-by: Peter Lieven Signed-off-by: Kevin Wolf (cherry picked from commit e56934becea70817124be1534f4289ce7d8f6733) Signed-off-by: Miroslav Rezanina Conflicts: block.c A conflict in the code being removed due to 83d0521a1e35989b0cb7235aef48455fedda3ca4 missing downstream. Signed-off-by: Max Reitz --- block.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/block.c b/block.c index dedfa52..bc6e75c 100644 --- a/block.c +++ b/block.c @@ -5489,11 +5489,6 @@ void bdrv_img_create(const char *filename, const char *fmt, ret = bdrv_open(bs, backing_file->value.s, NULL, back_flags, backing_drv, &local_err); if (ret < 0) { - error_setg_errno(errp, -ret, "Could not open '%s': %s", - backing_file->value.s, - error_get_pretty(local_err)); - error_free(local_err); - local_err = NULL; goto out; } bdrv_get_geometry(bs, &size); -- 1.8.3.1