Patchwork [02/17] libqemustub: vmstate register/unregister stubs

login
register
mail settings
Submitter Andreas Färber
Date Jan. 8, 2013, 8:56 p.m.
Message ID <1357678594-427-3-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/210501/
State New
Headers show

Comments

Andreas Färber - Jan. 8, 2013, 8:56 p.m.
From: Eduardo Habkost <ehabkost@redhat.com>

Add vmstate stub functions, so that qdev.o can be used without savevm.o
when vmstate support is not necessary (i.e. by *-user).

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 stubs/Makefile.objs |    1 +
 stubs/vmstate.c     |   17 +++++++++++++++++
 2 Dateien geändert, 18 Zeilen hinzugefügt(+)
 create mode 100644 stubs/vmstate.c

Patch

diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index 00f0b64..ca2197e 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -6,4 +6,5 @@  stub-obj-y += fdset-remove-fd.o
 stub-obj-y += get-fd.o
 stub-obj-y += set-fd-handler.o
 stub-obj-y += reset.o
+stub-obj-y += vmstate.o
 stub-obj-$(CONFIG_WIN32) += fd-register.o
diff --git a/stubs/vmstate.c b/stubs/vmstate.c
new file mode 100644
index 0000000..3682af5
--- /dev/null
+++ b/stubs/vmstate.c
@@ -0,0 +1,17 @@ 
+#include "qemu-common.h"
+#include "migration/vmstate.h"
+
+int vmstate_register_with_alias_id(DeviceState *dev,
+                                   int instance_id,
+                                   const VMStateDescription *vmsd,
+                                   void *base, int alias_id,
+                                   int required_for_version)
+{
+    return 0;
+}
+
+void vmstate_unregister(DeviceState *dev,
+                        const VMStateDescription *vmsd,
+                        void *opaque)
+{
+}