migration: Move check_migratable() into qdev.c

The function is only used once, and nothing else in migration knows
about objects.  Create the function vmstate_device_is_migratable() in
savem.c that really do the bit that is related with migration.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
Juan Quintela 2017-04-17 14:57:54 +02:00
parent bac3b21218
commit 1bfe5f0586
7 changed files with 31 additions and 29 deletions

View file

@ -1,7 +1,6 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "migration/vmstate.h"
#include "migration/migration.h"
const VMStateDescription vmstate_dummy = {};
@ -21,7 +20,7 @@ void vmstate_unregister(DeviceState *dev,
{
}
int check_migratable(Object *obj, Error **err)
bool vmstate_check_only_migratable(const VMStateDescription *vmsd)
{
return 0;
return true;
}