summaryrefslogtreecommitdiff
path: root/exec.c
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 /exec.c
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 'exec.c')
-rw-r--r--exec.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/exec.c b/exec.c
index 487583b1bd..ba3f2cf6df 100644
--- a/exec.c
+++ b/exec.c
@@ -454,6 +454,7 @@ static const VMStateDescription vmstate_cpu_common_exception_index = {
.name = "cpu_common/exception_index",
.version_id = 1,
.minimum_version_id = 1,
+ .needed = cpu_common_exception_index_needed,
.fields = (VMStateField[]) {
VMSTATE_INT32(exception_index, CPUState),
VMSTATE_END_OF_LIST()
@@ -471,13 +472,9 @@ const VMStateDescription vmstate_cpu_common = {
VMSTATE_UINT32(interrupt_request, CPUState),
VMSTATE_END_OF_LIST()
},
- .subsections = (VMStateSubsection[]) {
- {
- .vmsd = &vmstate_cpu_common_exception_index,
- .needed = cpu_common_exception_index_needed,
- } , {
- /* empty */
- }
+ .subsections = (const VMStateDescription*[]) {
+ &vmstate_cpu_common_exception_index,
+ NULL
}
};