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

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

 




sorry for forgetting CC the mail list.

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





2012/11/6 bill4carson <bill4carson@xxxxxxxxx>


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
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

--
浮沉随浪只记今朝笑

--bill




2012/11/6 Zhouping Liu <sanweidaying@xxxxxxxxx>



2012/11/6 bill4carson <bill4carson@xxxxxxxxx>


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
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

--
浮沉随浪只记今朝笑

--bill


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux