Re: [PATCH v3 02/18] snapshot: Rework virDomainSnapshotState enum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 3/4/19 10:34 PM, Eric Blake wrote:
> The existing virDomainSnapshotState is a superset of virDomainState,
> adding one more state (disk-snapshot) on top of valid domain states.
> But as written, the enum cannot be used for gcc validation that all
> enum values are covered in a strongly-typed switch condition, because
> the enum does not explicitly include the values it is adding to.
> 
> Copy the style used in qemu_blockjob.h of creating new enum names
> for every inherited value, and update most clients to use the new
> enum names anywhere snapshot state is referenced. The exception is
> two switch statements in qemu code, which instead gain a fixme
> comment about odd type usage (which will be cleaned up in the next
> patch). The rest of the patch is mechanical.
> 
> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> ---
>  src/conf/snapshot_conf.h | 21 ++++++++++++++++++---
>  src/conf/snapshot_conf.c | 28 ++++++++++++++--------------
>  src/qemu/qemu_driver.c   | 34 ++++++++++++++++++++++------------
>  src/test/test_driver.c   | 20 ++++++++++----------
>  src/vbox/vbox_common.c   |  4 ++--
>  5 files changed, 66 insertions(+), 41 deletions(-)
> 

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux