* is there a C func that can check kernel config file?
@ 2012-11-06 2:35 Zhouping Liu
2012-11-06 4:48 ` Adam Lee
[not found] ` <5098D058.1060003@gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Zhouping Liu @ 2012-11-06 2:35 UTC (permalink / raw)
To: kernelnewbies
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?
Thanks,
Zhouping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121106/34509e35/attachment.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* is there a C func that can check kernel config file?
2012-11-06 2:35 is there a C func that can check kernel config file? Zhouping Liu
@ 2012-11-06 4:48 ` Adam Lee
[not found] ` <5098D058.1060003@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Adam Lee @ 2012-11-06 4:48 UTC (permalink / raw)
To: kernelnewbies
On Tue, Nov 06, 2012 at 10:35:09AM +0800, 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?
>
linux/scripts/kconfig/lkc.h and lkc_proto.h
like sym_get_tristate_value(), sym_get_string_value()...
--
Regards,
Adam Lee
http://adam8157.info
^ permalink raw reply [flat|nested] 4+ messages in thread
* Fwd: is there a C func that can check kernel config file?
[not found] ` <CAOc6HJ6XnQvm-M+Fz2n5Gm=dg2w58D7eH3Ovwo1gNnjVqeUZiw@mail.gmail.com>
@ 2012-11-06 10:23 ` Zhouping Liu
2012-11-11 0:34 ` Ezequiel Garcia
0 siblings, 1 reply; 4+ messages in thread
From: Zhouping Liu @ 2012-11-06 10:23 UTC (permalink / raw)
To: kernelnewbies
sorry for forgetting CC the mail list.
---------- Forwarded message ----------
From: Zhouping Liu <sanweidaying@gmail.com>
Date: 2012/11/6
Subject: Re: is there a C func that can check kernel config file?
To: bill4carson <bill4carson@gmail.com>
2012/11/6 bill4carson <bill4carson@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@kernelnewbies.org>
>> http://lists.kernelnewbies.**org/mailman/listinfo/**kernelnewbies<http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies>
>>
>
> --
> ?????????
>
> --bill
>
2012/11/6 Zhouping Liu <sanweidaying@gmail.com>
>
>
>
> 2012/11/6 bill4carson <bill4carson@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@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* is there a C func that can check kernel config file?
2012-11-06 10:23 ` Fwd: " Zhouping Liu
@ 2012-11-11 0:34 ` Ezequiel Garcia
0 siblings, 0 replies; 4+ messages in thread
From: Ezequiel Garcia @ 2012-11-11 0:34 UTC (permalink / raw)
To: kernelnewbies
On Tue, Nov 6, 2012 at 7:23 AM, Zhouping Liu <sanweidaying@gmail.com> wrote:
>
> /proc/config.gz has been removed (not sure since which kernel version), also
> it's similar with checking '/usr/src/kernels/`uname -r`/.config'.
>
AFAIK, my 3.7 git trees show that CONFIG_IKCONFIG option is still available.
This option, when selected, lets you read your kernel config at /proc/config.gz.
I'd be very much surprised to find out this option has been removed,
given its usefulness.
Ezequiel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-11 0:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-06 2:35 is there a C func that can check kernel config file? Zhouping Liu
2012-11-06 4:48 ` Adam Lee
[not found] ` <5098D058.1060003@gmail.com>
[not found] ` <CAOc6HJ6XnQvm-M+Fz2n5Gm=dg2w58D7eH3Ovwo1gNnjVqeUZiw@mail.gmail.com>
2012-11-06 10:23 ` Fwd: " Zhouping Liu
2012-11-11 0:34 ` Ezequiel Garcia
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.