migration: Correctly handle subsections with no 'needed' function
commit6f4923fcad305966b10780601a016ecaf8a91224
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 7 Aug 2018 13:03:55 +0000 (7 14:03 +0100)
committerJuan Quintela <quintela@redhat.com>
Wed, 22 Aug 2018 09:40:47 +0000 (22 11:40 +0200)
tree0431905b41e88407f4c5b6d6819a83e1e5f2b91f
parentbe1d2c49eac647f55172bce8e56ec09745c8d045
migration: Correctly handle subsections with no 'needed' function

Currently the vmstate subsection handling code treats a subsection
with no 'needed' function pointer as if it were the subsection
list terminator, so the subsection is never transferred and nor
is any subsection following it in the list.

Handle NULL 'needed' function pointers in subsections in the same
way that we do for top level VMStateDescription structures:
treat the subsection as always being needed.

This doesn't change behaviour for the current set of devices
in the tree, because all subsections declare a 'needed' function.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/vmstate.c