summaryrefslogtreecommitdiffstats
path: root/include/block
diff options
context:
space:
mode:
authorMaxim Levitsky2020-12-17 18:09:03 +0100
committerKevin Wolf2021-02-15 15:10:14 +0100
commita890f08e586fd81946c51dae6a878d64486b1364 (patch)
tree8a35618d720e9e07f7f063ef2431a3898a999cac /include/block
parentcrypto: luks: Fix tiny memory leak (diff)
downloadqemu-a890f08e586fd81946c51dae6a878d64486b1364.tar.gz
qemu-a890f08e586fd81946c51dae6a878d64486b1364.tar.xz
qemu-a890f08e586fd81946c51dae6a878d64486b1364.zip
block: add bdrv_co_delete_file_noerr
This function wraps bdrv_co_delete_file for the common case of removing a file, which was just created by format driver, on an error condition. It hides the -ENOTSUPP error, and reports all other errors otherwise. Use it in luks driver Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-Id: <20201217170904.946013-3-mlevitsk@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h
index a9b7f03f11..b3f6e509d4 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -441,6 +441,7 @@ int bdrv_freeze_backing_chain(BlockDriverState *bs, BlockDriverState *base,
Error **errp);
void bdrv_unfreeze_backing_chain(BlockDriverState *bs, BlockDriverState *base);
int coroutine_fn bdrv_co_delete_file(BlockDriverState *bs, Error **errp);
+void coroutine_fn bdrv_co_delete_file_noerr(BlockDriverState *bs);
typedef struct BdrvCheckResult {