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:
Juan Quintela 2009-08-20 19:42:40 +02:00 committed by Anthony Liguori
parent 73534f2f68
commit cff09e9239
2 changed files with 3 additions and 0 deletions

View File

@ -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;
};

View File

@ -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;
}