cryptospore / rpms / qemu-kvm

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