diff options
author | Juan Quintela <quintela@redhat.com> | 2012-06-26 18:46:10 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2012-07-20 08:19:27 +0200 |
commit | 7908c78d3e1a117ae6b9545e601409eee3d33863 (patch) | |
tree | 6b58bdcf72b13c958459ae6df46427c1a14c66d1 /arch_init.c | |
parent | 22ea40f4ff072a113fdf96bff10bc81ee063da32 (diff) | |
download | qemu-7908c78d3e1a117ae6b9545e601409eee3d33863.zip |
savevm: Live migration handlers register the struct directly
Notice that the live migration users never unregister, so no problem
about freeing the ops structure.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'arch_init.c')
-rw-r--r-- | arch_init.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch_init.c b/arch_init.c index 5b0f5626a9..606b848474 100644 --- a/arch_init.c +++ b/arch_init.c @@ -298,7 +298,7 @@ static void migration_end(void) #define MAX_WAIT 50 /* ms, half buffered_file limit */ -int ram_save_live(QEMUFile *f, int stage, void *opaque) +static int ram_save_live(QEMUFile *f, int stage, void *opaque) { ram_addr_t addr; uint64_t bytes_transferred_last; @@ -437,7 +437,7 @@ static inline void *host_from_stream_offset(QEMUFile *f, return NULL; } -int ram_load(QEMUFile *f, void *opaque, int version_id) +static int ram_load(QEMUFile *f, void *opaque, int version_id) { ram_addr_t addr; int flags, ret = 0; @@ -534,6 +534,11 @@ done: return ret; } +SaveVMHandlers savevm_ram_handlers = { + .save_live_state = ram_save_live, + .load_state = ram_load, +}; + #ifdef HAS_AUDIO struct soundhw { const char *name; |