mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 21:33:40 +08:00
migration: add error_report
Added error_report where version_ids do not match in vmstate_load_state. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com> Message-Id: <1484852453-12728-5-git-send-email-duanj@linux.vnet.ibm.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
7e99f22cbe
commit
cde7ee5974
@ -85,6 +85,9 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
|
|||||||
|
|
||||||
trace_vmstate_load_state(vmsd->name, version_id);
|
trace_vmstate_load_state(vmsd->name, version_id);
|
||||||
if (version_id > vmsd->version_id) {
|
if (version_id > vmsd->version_id) {
|
||||||
|
error_report("%s: incoming version_id %d is too new "
|
||||||
|
"for local version_id %d",
|
||||||
|
vmsd->name, version_id, vmsd->version_id);
|
||||||
trace_vmstate_load_state_end(vmsd->name, "too new", -EINVAL);
|
trace_vmstate_load_state_end(vmsd->name, "too new", -EINVAL);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@ -95,6 +98,9 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
|
|||||||
trace_vmstate_load_state_end(vmsd->name, "old path", ret);
|
trace_vmstate_load_state_end(vmsd->name, "old path", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
error_report("%s: incoming version_id %d is too old "
|
||||||
|
"for local minimum version_id %d",
|
||||||
|
vmsd->name, version_id, vmsd->minimum_version_id);
|
||||||
trace_vmstate_load_state_end(vmsd->name, "too old", -EINVAL);
|
trace_vmstate_load_state_end(vmsd->name, "too old", -EINVAL);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user