diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2022-02-02 10:59:10 +0000 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2022-02-02 11:23:28 +0000 |
commit | b3caf2ca6fc82cba0479fe3b46c3da95bbeaaec9 (patch) | |
tree | ed520ebb14e92b2455c2d5d4cc97793f0389900c | |
parent | 04fc0b03f0b109fc1ba61348163e3e0b1fea09fe (diff) | |
download | slirp-b3caf2ca6fc82cba0479fe3b46c3da95bbeaaec9.zip slirp-b3caf2ca6fc82cba0479fe3b46c3da95bbeaaec9.tar.gz slirp-b3caf2ca6fc82cba0479fe3b46c3da95bbeaaec9.tar.bz2 |
Add VMS_END marker
The migration VMSTATE_END_OF_LIST marker relies on a NULL field
to mark th eend of a list; that's a bit delicate when the marker is
forgotten and the code hits a NULL by luck.
Use an explicit flag to mark the end as well.
See: https://lists.gnu.org/archive/html/qemu-devel/2022-01/msg03025.html
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-rw-r--r-- | src/vmstate.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vmstate.h b/src/vmstate.h index 94c6a4b..e3e2459 100644 --- a/src/vmstate.h +++ b/src/vmstate.h @@ -173,6 +173,9 @@ enum VMStateFlags { * VMStateField.struct_version_id to tell which version of the * structure we are referencing to use. */ VMS_VSTRUCT = 0x8000, + + /* Marker for end of list */ + VMS_END = 0x10000 }; struct VMStateField { @@ -386,6 +389,7 @@ extern const VMStateInfo slirp_vmstate_info_tmp; #define VMSTATE_END_OF_LIST() \ { \ + .flags = VMS_END, \ } #endif |