From b3caf2ca6fc82cba0479fe3b46c3da95bbeaaec9 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Wed, 2 Feb 2022 10:59:10 +0000 Subject: 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 --- src/vmstate.h | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.1