aboutsummaryrefslogtreecommitdiff
path: root/include/migration
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2014-09-23 14:09:54 +0200
committerJuan Quintela <quintela@redhat.com>2015-06-12 06:53:57 +0200
commit5cd8cadae8db905afcbf877cae568c27d1d55a8a (patch)
treed6932290619f414a963ffb2a330e42bda1437492 /include/migration
parent0163a2e025cda6acb33e100d296965671ace17d9 (diff)
migration: Use normal VMStateDescriptions for Subsections
We create optional sections with this patch. But we already have optional subsections. Instead of having two mechanism that do the same, we can just generalize it. For subsections we just change: - Add a needed function to VMStateDescription - Remove VMStateSubsection (after removal of the needed function it is just a VMStateDescription) - Adjust the whole tree, moving the needed function to the corresponding VMStateDescription Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include/migration')
-rw-r--r--include/migration/vmstate.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index bc7616aaa8..fc5e6439e4 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -120,11 +120,6 @@ typedef struct {
bool (*field_exists)(void *opaque, int version_id);
} VMStateField;
-typedef struct VMStateSubsection {
- const VMStateDescription *vmsd;
- bool (*needed)(void *opaque);
-} VMStateSubsection;
-
struct VMStateDescription {
const char *name;
int unmigratable;
@@ -135,8 +130,9 @@ struct VMStateDescription {
int (*pre_load)(void *opaque);
int (*post_load)(void *opaque, int version_id);
void (*pre_save)(void *opaque);
+ bool (*needed)(void *opaque);
VMStateField *fields;
- const VMStateSubsection *subsections;
+ const VMStateDescription **subsections;
};
extern const VMStateDescription vmstate_dummy;