mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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>
This commit is contained in:
parent
0b62bcbc61
commit
2b624fe079
3 changed files with 11 additions and 9 deletions
|
@ -2346,10 +2346,10 @@ int load_snapshot(const char *name, Error **errp)
|
|||
/* Flush all IO requests so they don't interfere with the new state. */
|
||||
bdrv_drain_all_begin();
|
||||
|
||||
ret = bdrv_all_goto_snapshot(name, &bs);
|
||||
ret = bdrv_all_goto_snapshot(name, &bs, errp);
|
||||
if (ret < 0) {
|
||||
error_setg(errp, "Error %d while activating snapshot '%s' on '%s'",
|
||||
ret, name, bdrv_get_device_name(bs));
|
||||
error_prepend(errp, "Could not load snapshot '%s' on '%s': ",
|
||||
name, bdrv_get_device_name(bs));
|
||||
goto err_drain;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue