aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2015-11-19 09:42:02 +0300
committerJuan Quintela <quintela@redhat.com>2015-11-19 11:50:00 +0100
commit25af925fffc29f2e4c05aee10c61c823c4cdf398 (patch)
tree4fb6217255b4d38a1c27edbcd2770227b87207c9 /block
parente9ff957ac26e0e11869a3568cfa7423ae33c51e7 (diff)
snapshot: return error code from bdrv_snapshot_delete_by_id_or_name
this will make code better in the next patch Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/snapshot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/block/snapshot.c b/block/snapshot.c
index d929d08913..ed0422df9f 100644
--- a/block/snapshot.c
+++ b/block/snapshot.c
@@ -253,9 +253,9 @@ int bdrv_snapshot_delete(BlockDriverState *bs,
return -ENOTSUP;
}
-void bdrv_snapshot_delete_by_id_or_name(BlockDriverState *bs,
- const char *id_or_name,
- Error **errp)
+int bdrv_snapshot_delete_by_id_or_name(BlockDriverState *bs,
+ const char *id_or_name,
+ Error **errp)
{
int ret;
Error *local_err = NULL;
@@ -270,6 +270,7 @@ void bdrv_snapshot_delete_by_id_or_name(BlockDriverState *bs,
if (ret < 0) {
error_propagate(errp, local_err);
}
+ return ret;
}
int bdrv_snapshot_list(BlockDriverState *bs,