mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
vmstate: Add pre_load() hook
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
752ff2fa31
commit
fd4d52deab
2 changed files with 6 additions and 0 deletions
5
savevm.c
5
savevm.c
|
@ -1028,6 +1028,11 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
|
|||
if (version_id < vmsd->minimum_version_id) {
|
||||
return vmsd->load_state_old(f, opaque, version_id);
|
||||
}
|
||||
if (vmsd->pre_load) {
|
||||
int ret = vmsd->pre_load(opaque);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
while(field->name) {
|
||||
if (field->version_id <= version_id) {
|
||||
void *base_addr = opaque + field->offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue