]> xenbits.xensource.com Git - libvirt.git/commit
snapshot: Refactor list filtering
authorEric Blake <eblake@redhat.com>
Wed, 20 Mar 2019 02:33:23 +0000 (21:33 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 22 Mar 2019 06:18:33 +0000 (01:18 -0500)
commitde80cdbcc99082951a2875f8710078df67116ffd
tree0781d19c31914762fba9d1290cf8464afca994f5
parent55c2ab3e2b3b6db858f904eb6c77d35996dedc9b
snapshot: Refactor list filtering

Separate the algorithm for which list members to vist (which is
generic and can be shared with checkpoints, provided that common
filtering bits are either declared with the same value or have a
mapping from public API to common value) from the decision on which
members to return (which is specific to snapshots).  The typedef for
the callback function feels a bit heavy here, but will make it easier
to move the common portions in a later patch.

As part of the refactoring, note that the macros for selecting filter
bits are specific to listing functionality, so they belong better in
virdomainsnapshotobjlist.h (missed in commit 9b75154c).

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/conf/snapshot_conf.h
src/conf/virdomainsnapshotobjlist.c
src/conf/virdomainsnapshotobjlist.h
tools/virsh-snapshot.c