diff options
author | Juan Quintela <quintela@redhat.com> | 2009-09-10 03:04:31 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-09-11 11:10:05 -0500 |
commit | fd4d52deab2b1e13c559fd8e4ed4d5eb515f30cb (patch) | |
tree | fb8b23af16ac72a2b9ec5d4c00c84df8a7913c6d /savevm.c | |
parent | 752ff2fa3188f8bd9a105024ab65f6fe53736126 (diff) | |
download | qemu-fd4d52deab2b1e13c559fd8e4ed4d5eb515f30cb.tar.gz qemu-fd4d52deab2b1e13c559fd8e4ed4d5eb515f30cb.tar.bz2 qemu-fd4d52deab2b1e13c559fd8e4ed4d5eb515f30cb.zip |
vmstate: Add pre_load() hook
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'savevm.c')
-rw-r--r-- | savevm.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |