aboutsummaryrefslogtreecommitdiff
path: root/replay
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2017-04-18 18:12:35 +0200
committerJuan Quintela <quintela@redhat.com>2017-05-17 12:04:59 +0200
commit927d66381948659b0acbb1b3f23de5a5008d48a4 (patch)
treecdbdbd70243fda8f7cce17a39a4eb591cb0b2246 /replay
parent2bf3aa85f08186b8162b76e7e8efe5b5a44306a6 (diff)
downloadqemu-927d66381948659b0acbb1b3f23de5a5008d48a4.zip
qemu-927d66381948659b0acbb1b3f23de5a5008d48a4.tar.gz
qemu-927d66381948659b0acbb1b3f23de5a5008d48a4.tar.bz2
migration: Pass Error ** argument to {save,load}_vmstate
This way we use the "normal" way of printing errors for hmp commands. Signed-off-by: Juan Quintela <quintela@redhat.com> Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Diffstat (limited to 'replay')
-rw-r--r--replay/replay-snapshot.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/replay/replay-snapshot.c b/replay/replay-snapshot.c
index 8cced46..c75cd38 100644
--- a/replay/replay-snapshot.c
+++ b/replay/replay-snapshot.c
@@ -62,14 +62,18 @@ void replay_vmstate_register(void)
void replay_vmstate_init(void)
{
+ Error *err = NULL;
+
if (replay_snapshot) {
if (replay_mode == REPLAY_MODE_RECORD) {
- if (save_vmstate(replay_snapshot) != 0) {
+ if (save_vmstate(replay_snapshot, &err) != 0) {
+ error_report_err(err);
error_report("Could not create snapshot for icount record");
exit(1);
}
} else if (replay_mode == REPLAY_MODE_PLAY) {
- if (load_vmstate(replay_snapshot) != 0) {
+ if (load_vmstate(replay_snapshot, &err) != 0) {
+ error_report_err(err);
error_report("Could not load snapshot for icount replay");
exit(1);
}