diff options
author | Kevin Wolf <kwolf@redhat.com> | 2017-11-20 15:36:48 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-11-21 14:48:22 +0100 |
commit | 2b624fe079ee7123797f6c685e714795665c0e01 (patch) | |
tree | 456f03cb333285ea73afdb8dcc21967538d3ce9f /block | |
parent | 0b62bcbc61c0cd4c9e7fb3863cf5dc8016b0b4ed (diff) | |
download | qemu-2b624fe079ee7123797f6c685e714795665c0e01.zip qemu-2b624fe079ee7123797f6c685e714795665c0e01.tar.gz qemu-2b624fe079ee7123797f6c685e714795665c0e01.tar.bz2 |
block: Add errp to bdrv_all_goto_snapshot()
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/snapshot.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/block/snapshot.c b/block/snapshot.c index 75562df..8585599 100644 --- a/block/snapshot.c +++ b/block/snapshot.c @@ -467,9 +467,10 @@ fail: } -int bdrv_all_goto_snapshot(const char *name, BlockDriverState **first_bad_bs) +int bdrv_all_goto_snapshot(const char *name, BlockDriverState **first_bad_bs, + Error **errp) { - int err = 0; + int ret = 0; BlockDriverState *bs; BdrvNextIterator it; @@ -478,10 +479,10 @@ int bdrv_all_goto_snapshot(const char *name, BlockDriverState **first_bad_bs) aio_context_acquire(ctx); if (bdrv_can_snapshot(bs)) { - err = bdrv_snapshot_goto(bs, name, NULL); + ret = bdrv_snapshot_goto(bs, name, errp); } aio_context_release(ctx); - if (err < 0) { + if (ret < 0) { bdrv_next_cleanup(&it); goto fail; } @@ -489,7 +490,7 @@ int bdrv_all_goto_snapshot(const char *name, BlockDriverState **first_bad_bs) fail: *first_bad_bs = bs; - return err; + return ret; } int bdrv_all_find_snapshot(const char *name, BlockDriverState **first_bad_bs) |