
On 05/18/2011 02:11 AM, Daniel Veillard wrote:
typedef enum { - VIR_DOMAIN_SCHED_FIELD_INT = 1, /* integer case */ - VIR_DOMAIN_SCHED_FIELD_UINT = 2, /* unsigned integer case */ - VIR_DOMAIN_SCHED_FIELD_LLONG = 3, /* long long case */ - VIR_DOMAIN_SCHED_FIELD_ULLONG = 4, /* unsigned long long case */ - VIR_DOMAIN_SCHED_FIELD_DOUBLE = 5, /* double case */ - VIR_DOMAIN_SCHED_FIELD_BOOLEAN = 6 /* boolean(character) case */ + VIR_DOMAIN_SCHED_FIELD_INT = VIR_TYPED_PARAM_INT, + VIR_DOMAIN_SCHED_FIELD_UINT = VIR_TYPED_PARAM_UINT, + VIR_DOMAIN_SCHED_FIELD_LLONG = VIR_TYPED_PARAM_LLONG, + VIR_DOMAIN_SCHED_FIELD_ULLONG = VIR_TYPED_PARAM_ULLONG, + VIR_DOMAIN_SCHED_FIELD_DOUBLE = VIR_TYPED_PARAM_DOUBLE, + VIR_DOMAIN_SCHED_FIELD_BOOLEAN = VIR_TYPED_PARAM_BOOLEAN, } virSchedParameterType;
Can we remove VIR_DOMAIN_SCHED_FIELD_XXX and use VIR_TYPED_PARAM_XXX directly since parameter types are basically types like int, long, ... and don't depend on what parameters are?
No, but I could do a followup patch that moves the old names to the bottom of the file along with a comment that they are old names; as well as clean up the rest of the code to use the new (shorter) names consistently.
Patch looks fine to me, and we should do that cleanup before the next release !
ACK,
Thanks; I've pushed this one as-is. New interfaces that follow the same paradigm can use the new type without having to create wrapper names (for example, I know that the net_cls cgroup controller has some name/value pairs worth exposing through libvirt someday). -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org