diff mbox

[RFC,qom-cpu,v2,8/8] cpu: Guard cpu_{save, load}() definitions

Message ID 1361216553-4549-9-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber Feb. 18, 2013, 7:42 p.m. UTC
A few targets already managed to implement cpu_save() and cpu_load()
without defining CPU_SAVE_VERSION that causes them to be registered.

Guard the prototypes with CPU_SAVE_VERSION to avoid this happening again
until all targets are converted to VMState or QIDL.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 include/qemu-common.h |    2 ++
 1 Datei geändert, 2 Zeilen hinzugefügt(+)

Comments

Juan Quintela Feb. 22, 2013, 1:12 p.m. UTC | #1
Andreas Färber <afaerber@suse.de> wrote:
> A few targets already managed to implement cpu_save() and cpu_load()
> without defining CPU_SAVE_VERSION that causes them to be registered.
>
> Guard the prototypes with CPU_SAVE_VERSION to avoid this happening again
> until all targets are converted to VMState or QIDL.
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Juan Quintela <quintela@redhat.com>
diff mbox

Patch

diff --git a/include/qemu-common.h b/include/qemu-common.h
index 80016ad..3a65083 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -280,8 +280,10 @@  bool tcg_enabled(void);
 void cpu_exec_init_all(void);
 
 /* CPU save/load.  */
+#ifdef CPU_SAVE_VERSION
 void cpu_save(QEMUFile *f, void *opaque);
 int cpu_load(QEMUFile *f, void *opaque, int version_id);
+#endif
 
 /* Unblock cpu */
 void qemu_cpu_kick_self(void);