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>
This commit is contained in:
Juan Quintela 2012-06-26 18:46:10 +02:00
parent 22ea40f4ff
commit 7908c78d3e
6 changed files with 26 additions and 23 deletions

View file

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