[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 03/25] block: Fix error path in bdrv_backing_update_f
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 03/25] block: Fix error path in bdrv_backing_update_filename() |
Date: |
Fri, 17 Nov 2017 19:16:31 +0100 |
error_setg_errno() takes a positive errno code. Spotted by Coverity
(CID 1381628).
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <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
- [Qemu-block] [PULL 00/25] Block layer patches for 2.11.0-rc2, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 01/25] replication: Fix replication open fail, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 02/25] qemu-iotests: Use -nographic in 182, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 04/25] qcow2: don't permit changing encryption parameters, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 03/25] block: Fix error path in bdrv_backing_update_filename(),
Kevin Wolf <=
- [Qemu-block] [PULL 05/25] block: Deprecate bdrv_set_read_only() and users, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 07/25] block: Fix permissions in image activation, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 06/25] qcow2: fix image corruption after committing qcow2 image into base, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 08/25] iotests: test clearing unknown autoclear_features by qcow2, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 11/25] qapi/qlist: Add qlist_append_null() macro, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 10/25] qapi/qnull: Add own header, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 12/25] qapi: Add qobject_is_equal(), Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 13/25] block: qobject_is_equal() in bdrv_reopen_prepare(), Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 09/25] qcow2: fix image corruption on commit with persistent bitmap, Kevin Wolf, 2017/11/17
- [Qemu-block] [PULL 14/25] iotests: Add test for non-string option reopening, Kevin Wolf, 2017/11/17