summaryrefslogtreecommitdiff
path: root/include/migration/vmstate.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-01-01 21:56:57 +0000
committerJuan Quintela <quintela@redhat.com>2014-02-04 15:51:45 +0100
commit20bcf73fa80c3477b6aaf5f39f18f031ff55de92 (patch)
tree9206d86ca4125b3370c1b4144b9c34eccd8aebf6 /include/migration/vmstate.h
parent8cfc114a2f293c40077d1bdb7500b29db359ca22 (diff)
downloadqemu-20bcf73fa80c3477b6aaf5f39f18f031ff55de92.zip
vmstate: Make VMSTATE_STRUCT_POINTER take type, not ptr-to-type
The VMSTATE_STRUCT_POINTER macros are a bit odd in that they must be passed an argument "FooType *" rather than just taking the FooType. They're only used in one place, so it's easy to tidy this up. This also lets us use the macro to replace the hand-rolled VMSTATE_PTIMER. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include/migration/vmstate.h')
-rw-r--r--include/migration/vmstate.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index be193baba1..fbd16a03e6 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -314,9 +314,9 @@ extern const VMStateInfo vmstate_info_bitmap;
.name = (stringify(_field)), \
.version_id = (_version), \
.vmsd = &(_vmsd), \
- .size = sizeof(_type), \
+ .size = sizeof(_type *), \
.flags = VMS_STRUCT|VMS_POINTER, \
- .offset = vmstate_offset_value(_state, _field, _type), \
+ .offset = vmstate_offset_pointer(_state, _field, _type), \
}
#define VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, _version, _vmsd, _type) { \
@@ -324,9 +324,9 @@ extern const VMStateInfo vmstate_info_bitmap;
.version_id = (_version), \
.field_exists = (_test), \
.vmsd = &(_vmsd), \
- .size = sizeof(_type), \
+ .size = sizeof(_type *), \
.flags = VMS_STRUCT|VMS_POINTER, \
- .offset = vmstate_offset_value(_state, _field, _type), \
+ .offset = vmstate_offset_pointer(_state, _field, _type), \
}
#define VMSTATE_ARRAY_OF_POINTER(_field, _state, _num, _version, _info, _type) {\