block: Fix error path in bdrv_backing_update_filename()
PATCH 1/1 block: Fix error path in bdrv_backing_update_filename()
error_setg_errno() takes a positive errno code.
--- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block.c +1 -1
@@ -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 )) {
Signature · 1 line
2.13.6
Quoted 6 lines · Kevin Wolf
error_setg_errno()takes a positive errno code.Signed-off-by Kevin Wolf <[email protected]>--- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Worth mentioning Coverity in the commit message?
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 3 lines · Kevin Wolf
error_setg_errno()takes a positive errno code.Signed-off-by Kevin Wolf <[email protected]>
Berto
Quoted 6 lines · Kevin Wolf
error_setg_errno()takes a positive errno code.Signed-off-by Kevin Wolf <[email protected]>--- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 21 lines · Kevin Wolf
error_setg_errno()takes a positive errno code.Signed-off-by Kevin Wolf <[email protected]>--- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block.c +1
-2@@ -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 )) { --
Quoted 1 line
2.13.6
Just noticed going through coverity warnings that this didn't make it into rc1 -- could we get it in for rc2, please?
thanks
-- PMM
Am 15.11.2017 um 20:41 hat Peter Maydell geschrieben:
Quoted 20 lines · Kevin Wolf
Quoted 19 lines
error_setg_errno()takes a positive errno code.Signed-off-by Kevin Wolf <[email protected]>--- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block.c +1
-1@@ -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" ); }
Quoted 6 lines
Quoted 3 lines
block.c +0
-1if (!(orig_flags &BDRV_O_RDWR )) { --2.13.6
Just noticed going through coverity warnings that this didn't make it into rc1 -- could we get it in for rc2, please?
Yes. I was sick at the start of the week and Max didn't include my queue in his pull request, so all the patches I had queued missed -rc1 and will be sent for -rc2 instead.
Kevin