aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/savevm.c b/savevm.c
index 4e970ca0db..304d1effe5 100644
--- a/savevm.c
+++ b/savevm.c
@@ -419,7 +419,9 @@ int qemu_file_get_error(QEMUFile *f)
static void qemu_file_set_error(QEMUFile *f, int ret)
{
- f->last_error = ret;
+ if (f->last_error == 0) {
+ f->last_error = ret;
+ }
}
/** Flushes QEMUFile buffer
@@ -1588,13 +1590,13 @@ int qemu_savevm_state_begin(QEMUFile *f,
ret = se->ops->save_live_setup(f, se->opaque);
if (ret < 0) {
- qemu_savevm_state_cancel(f);
+ qemu_savevm_state_cancel();
return ret;
}
}
ret = qemu_file_get_error(f);
if (ret != 0) {
- qemu_savevm_state_cancel(f);
+ qemu_savevm_state_cancel();
}
return ret;
@@ -1645,7 +1647,7 @@ int qemu_savevm_state_iterate(QEMUFile *f)
}
ret = qemu_file_get_error(f);
if (ret != 0) {
- qemu_savevm_state_cancel(f);
+ qemu_savevm_state_cancel();
}
return ret;
}
@@ -1725,7 +1727,7 @@ uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size)
return ret;
}
-void qemu_savevm_state_cancel(QEMUFile *f)
+void qemu_savevm_state_cancel(void)
{
SaveStateEntry *se;
@@ -2307,7 +2309,7 @@ void do_delvm(Monitor *mon, const QDict *qdict)
}
}
-void do_info_snapshots(Monitor *mon)
+void do_info_snapshots(Monitor *mon, const QDict *qdict)
{
BlockDriverState *bs, *bs1;
QEMUSnapshotInfo *sn_tab, *sn, s, *sn_info = &s;