Fwd: is there a C func that can check kernel config file?
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@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@kernelnewbies.**org <Kernelnewbies@kernelnewbies.org> http://lists.kernelnewbies.**org/mailman/listinfo/**kernelnewbies<http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies>
-- 浮沉随浪只记今朝笑
--bill
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
participants (2)
-
Ezequiel Garcia -
Zhouping Liu