libqemustub: vmstate register/unregister stubs

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>
This commit is contained in:
Eduardo Habkost 2012-12-05 14:49:08 -02:00 committed by Andreas Färber
parent 41c6bcd912
commit 083a5f8731
2 changed files with 18 additions and 0 deletions

View File

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

17
stubs/vmstate.c Normal file
View File

@ -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)
{
}