snapshot: Factor out redefine cycle validation
commite3989ce3eda6d9bbd36ce4c6c822cfb7428c300b
authorEric Blake <eblake@redhat.com>
Sat, 6 Jul 2019 02:07:43 +0000 (5 21:07 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 12 Jul 2019 20:12:29 +0000 (12 15:12 -0500)
tree2bbb00a9afdb020818c6763cc1bdcbc0007d55db
parentff09b1f62bb359eac3d3da6a939482dc7798dac4
snapshot: Factor out redefine cycle validation

The code to check whether a redefined snapshot/checkpoint XML is
attempting to create a cycle in the list of moments is lengthy, and
common between the two types of list. Therefore, it belongs in the
shared base file.

Signed-off-by: Eric Blake <eblake@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
src/conf/snapshot_conf.c
src/conf/virdomainmomentobjlist.c
src/conf/virdomainmomentobjlist.h
src/conf/virdomainsnapshotobjlist.c
src/conf/virdomainsnapshotobjlist.h
tests/virsh-snapshot