qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/2] block: Propagate error in bdrv_img_create()


From: Max Reitz
Subject: [Qemu-devel] [PATCH 1/2] block: Propagate error in bdrv_img_create()
Date: Mon, 27 Oct 2014 13:30:08 +0100

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 <address@hidden>
---
 block.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/block.c b/block.c
index 88f6d9b..44fa908 100644
--- a/block.c
+++ b/block.c
@@ -5577,11 +5577,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);
-- 
1.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]