Fwd: is there a C func that can check kernel config file?

Zhouping Liu sanweidaying at gmail.com
Tue Nov 6 05:23:48 EST 2012


sorry for forgetting CC the mail list.

---------- Forwarded message ----------
From: Zhouping Liu <sanweidaying at gmail.com>
Date: 2012/11/6
Subject: Re: is there a C func that can check kernel config file?
To: bill4carson <bill4carson at gmail.com>





2012/11/6 bill4carson <bill4carson at gmail.com>

>
>
> On 2012年11月06日 10:35, Zhouping Liu wrote:
>
>> Hello,
>>
>> As subject, as we know we can check the kernel config file through
>> reading '/usr/src/kernels/`uname -r`/.config' (fedora distro), it's
>> apparently to find out which config is open/close. but if I'd like do this
>> in C program, how to do that, is there interface/func in some header file?
>>
>
>
> execve "zcat /proc/config.gz | grep CONFIG_XXX"
>

/proc/config.gz has been removed (not sure since which kernel version),
also it's similar with checking '/usr/src/kernels/`uname -r`/.config'.

I'm not sure whether there is a C function in system headers file, that can
recognize the special config option is open/close.

Thanks,
Zhouping


>
>
>
>  Thanks,
>> Zhouping
>>
>>
>>
>> ______________________________**_________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.**org <Kernelnewbies at kernelnewbies.org>
>> http://lists.kernelnewbies.**org/mailman/listinfo/**kernelnewbies<http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies>
>>
>
> --
> 浮沉随浪只记今朝笑
>
> --bill
>




2012/11/6 Zhouping Liu <sanweidaying at gmail.com>

>
>
>
> 2012/11/6 bill4carson <bill4carson at gmail.com>
>
>>
>>
>> On 2012年11月06日 10:35, Zhouping Liu wrote:
>>
>>> Hello,
>>>
>>> As subject, as we know we can check the kernel config file through
>>> reading '/usr/src/kernels/`uname -r`/.config' (fedora distro), it's
>>> apparently to find out which config is open/close. but if I'd like do this
>>> in C program, how to do that, is there interface/func in some header file?
>>>
>>
>>
>> execve "zcat /proc/config.gz | grep CONFIG_XXX"
>>
>
> /proc/config.gz has been removed (not sure since which kernel version),
> also it's similar with checking '/usr/src/kernels/`uname -r`/.config'.
>
> I'm not sure whether there is a C function in system headers file, that
> can recognize the special config option is open/close.
>
> Thanks,
> Zhouping
>
>
>>
>>
>>
>>  Thanks,
>>> Zhouping
>>>
>>>
>>>
>>> ______________________________**_________________
>>> Kernelnewbies mailing list
>>> Kernelnewbies at kernelnewbies.**org <Kernelnewbies at kernelnewbies.org>
>>> http://lists.kernelnewbies.**org/mailman/listinfo/**kernelnewbies<http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies>
>>>
>>
>> --
>> 浮沉随浪只记今朝笑
>>
>> --bill
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121106/35e583be/attachment.html 


More information about the Kernelnewbies mailing list