Signed-off-by: Pavel Hrdina <phrd...@redhat.com> --- migration.c | 2 +- savevm.c | 7 +++++-- sysemu.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/migration.c b/migration.c index 653a3c1..dde4dec 100644 --- a/migration.c +++ b/migration.c @@ -429,7 +429,7 @@ void migrate_fd_connect(MigrationState *s) migrate_fd_close); DPRINTF("beginning savevm\n"); - ret = qemu_savevm_state_begin(s->file, &s->params); + ret = qemu_savevm_state_begin(s->file, &s->params, NULL); if (ret < 0) { DPRINTF("failed, %d\n", ret); migrate_fd_error(s); diff --git a/savevm.c b/savevm.c index 0d14f71..d212cb2 100644 --- a/savevm.c +++ b/savevm.c @@ -1555,7 +1555,8 @@ bool qemu_savevm_state_blocked(Error **errp) } int qemu_savevm_state_begin(QEMUFile *f, - const MigrationParams *params) + const MigrationParams *params, + Error **errp) { SaveStateEntry *se; int ret; @@ -1595,12 +1596,14 @@ int qemu_savevm_state_begin(QEMUFile *f, ret = se->ops->save_live_setup(f, se->opaque); if (ret < 0) { + error_set(errp, QERR_GENERIC_ERROR, ret); qemu_savevm_state_cancel(f); return ret; } } ret = qemu_file_get_error(f); if (ret != 0) { + error_set(errp, QERR_GENERIC_ERROR, ret); qemu_savevm_state_cancel(f); } @@ -1737,7 +1740,7 @@ static int qemu_savevm_state(QEMUFile *f) goto out; } - ret = qemu_savevm_state_begin(f, ¶ms); + ret = qemu_savevm_state_begin(f, ¶ms, NULL); if (ret < 0) goto out; diff --git a/sysemu.h b/sysemu.h index 4669348..bc65c64 100644 --- a/sysemu.h +++ b/sysemu.h @@ -78,7 +78,8 @@ void qemu_announce_self(void); bool qemu_savevm_state_blocked(Error **errp); int qemu_savevm_state_begin(QEMUFile *f, - const MigrationParams *params); + const MigrationParams *params, + Error **errp); int qemu_savevm_state_iterate(QEMUFile *f); int qemu_savevm_state_complete(QEMUFile *f); void qemu_savevm_state_cancel(QEMUFile *f); -- 1.7.11.2