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

Re: [libvirt] [PATCH 2/2] maint: enforce use of _LAST marker



On Fri, Jan 20, 2012 at 14:06:27 -0700, Eric Blake wrote:
> 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.

ACK

Jirka


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