]> git.ipfire.org Git - thirdparty/libvirt.git/commit
maint: enforce use of _LAST marker
authorEric Blake <eblake@redhat.com>
Fri, 20 Jan 2012 21:00:58 +0000 (14:00 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 20 Jan 2012 23:16:04 +0000 (16:16 -0700)
commitbb69630b6c56b1b04c708dd6e57c76745c569332
tree2007656bd4741f161a567d22d566a93656fc5615
parent7b4e5693c13d5de1f0e14abda029e3148cbbe12f
maint: enforce use of _LAST marker

When converting a linear enum to a string, we have checks in
place in the VIR_ENUM_IMPL macro to ensure that there is one
string for every value, which lets us quickly flag if a user
added a value but forgot to add a counterpart string.  However,
this only works if we use the _LAST marker.

* cfg.mk (sc_require_enum_last_marker): New syntax check.
* src/conf/domain_conf.h (virDomainSnapshotState): Add new marker.
* src/conf/domain_conf.c (virDomainSnapshotState): Fix offender.
* src/qemu/qemu_monitor_json.c (qemuMonitorWatchdogAction)
(qemuMonitorIOErrorAction, qemuMonitorGraphicsAddressFamily):
Likewise.
* src/util/virtypedparam.c (virTypedParameter): Likewise.
cfg.mk
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_monitor_json.c
src/util/virtypedparam.c