savevm.c: Getting closer to upstream.
This patch refactors savevm.c considerably to get much closer
to upstream. The main benefit is the introduction of savevm_register()
and savevm_unregister() functions, which allow the client to provide
a description of the state through a VMStateDescription structure.
The 'legacy' register_savevm() and unregister_savevm() are still
provided (just like upstream does). Future patches will 'upgrade'
our virtual devices to the new interface.
NOTE: Since DeviceState is not implemented properly yet, qdev_get_path()
is stubbed to always return NULL.
Change-Id: I7bfa201da40a0e470fafde6ccc002a4216ecd9c1
diff --git a/hw/android/android_mips.c b/hw/android/android_mips.c
index ed9f42f..1d0f34f 100644
--- a/hw/android/android_mips.c
+++ b/hw/android/android_mips.c
@@ -167,7 +167,13 @@
env = cpu_init(cpu_model);
- register_savevm( "cpu", 0, MIPS_CPU_SAVE_VERSION, cpu_save, cpu_load, env );
+ register_savevm(NULL,
+ "cpu",
+ 0,
+ MIPS_CPU_SAVE_VERSION,
+ cpu_save,
+ cpu_load,
+ env);
if (ram_size > GOLDFISH_IO_SPACE)
ram_size = GOLDFISH_IO_SPACE; /* avoid overlap of ram and IO regs */