[lvm-devel] LVM2 ./WHATS_NEW_DM libdm/ioctl/libdm-iface.c ...

Peter Rajnoha prajnoha at redhat.com
Wed Jun 2 09:22:02 UTC 2010


On 06/02/2010 11:11 AM, Zdenek Kabelac wrote:
>> +    if (KERNEL_VERSION(_kernel_major, _kernel_minor, _kernel_release)>=
>> +        KERNEL_VERSION(2, 6, 0))
>>           _dm_multiple_major_support = 0;
>>
> 
> 
> I think slightly better API would be here - to call some function like:
> 
> int is_kernel_version_higher(major, minor,relase);
> 
> Returns 1 if the kernel version is > than given argument.
> And keep _kernel_major local static in this function.

Yeah, exactly, I have this in my mind too :) I'll just gather all uses of
uname throughout the code and see what else we need and then I'll probably
try to export it, so it's central and we don't need to do these uname calls
and checks here and there...

Peter




More information about the lvm-devel mailing list