qemu-block
[Top][All Lists]
Advanced

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

[Qemu-block] [PATCH] block: Fix error path in bdrv_backing_update_filena


From: Kevin Wolf
Subject: [Qemu-block] [PATCH] block: Fix error path in bdrv_backing_update_filename()
Date: Mon, 6 Nov 2017 17:55:00 +0100

error_setg_errno() takes a positive errno code.

Signed-off-by: Kevin Wolf <address@hidden>
---
 block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block.c b/block.c
index 684cb018da..f6415547fe 100644
--- a/block.c
+++ b/block.c
@@ -998,7 +998,7 @@ static int bdrv_backing_update_filename(BdrvChild *c, 
BlockDriverState *base,
     ret = bdrv_change_backing_file(parent, filename,
                                    base->drv ? base->drv->format_name : "");
     if (ret < 0) {
-        error_setg_errno(errp, ret, "Could not update backing file link");
+        error_setg_errno(errp, -ret, "Could not update backing file link");
     }
 
     if (!(orig_flags & BDRV_O_RDWR)) {
-- 
2.13.6




reply via email to

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