Re: [PATCH 1/7] libvirt.h: consolidate typed parameter handling

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

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]