aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-01-21 10:14:49 +0000
committerJuan Quintela <quintela@redhat.com>2015-02-05 17:16:14 +0100
commit0457d07342b175e3d2f0835bef1a67cf75dbc9d6 (patch)
tree024913404fe84ea74e9cdc7a4deac04d7e0ecad8 /savevm.c
parenta5df2a0222f424d86d0fd0b50e909af892da7eea (diff)
downloadqemu-arm-0457d07342b175e3d2f0835bef1a67cf75dbc9d6.tar.gz
Print errors in some of the early migration failure cases.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/savevm.c b/savevm.c
index 1cc0f02e02..98895fee81 100644
--- a/savevm.c
+++ b/savevm.c
@@ -883,16 +883,20 @@ int qemu_loadvm_state(QEMUFile *f)
QLIST_HEAD(, LoadStateEntry) loadvm_handlers =
QLIST_HEAD_INITIALIZER(loadvm_handlers);
LoadStateEntry *le, *new_le;
+ Error *local_err = NULL;
uint8_t section_type;
unsigned int v;
int ret;
- if (qemu_savevm_state_blocked(NULL)) {
+ if (qemu_savevm_state_blocked(&local_err)) {
+ error_report("%s", error_get_pretty(local_err));
+ error_free(local_err);
return -EINVAL;
}
v = qemu_get_be32(f);
if (v != QEMU_VM_FILE_MAGIC) {
+ error_report("Not a migration stream");
return -EINVAL;
}
@@ -902,6 +906,7 @@ int qemu_loadvm_state(QEMUFile *f)
return -ENOTSUP;
}
if (v != QEMU_VM_FILE_VERSION) {
+ error_report("Unsupported migration stream version");
return -ENOTSUP;
}