mirror of
https://github.com/xemu-project/xemu.git
synced 2025-04-02 11:11:48 -04:00
Add VMState support to run a function after load
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
73534f2f68
commit
cff09e9239
2 changed files with 3 additions and 0 deletions
1
hw/hw.h
1
hw/hw.h
|
@ -306,6 +306,7 @@ struct VMStateDescription {
|
|||
int minimum_version_id;
|
||||
int minimum_version_id_old;
|
||||
LoadStateHandler *load_state_old;
|
||||
int (*run_after_load)(void *opaque);
|
||||
VMStateField *fields;
|
||||
};
|
||||
|
||||
|
|
2
savevm.c
2
savevm.c
|
@ -1060,6 +1060,8 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
|
|||
}
|
||||
field++;
|
||||
}
|
||||
if (vmsd->run_after_load)
|
||||
return vmsd->run_after_load(opaque);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue