LINUX_VERSION_CODE in c
Hi,
My Linux version is Linux 2.6.9-42.ELsmp I am printing the value of LINUX_VERSION_CODE in c program which comes out to be 132116. I also tried to get the value by KERNEL_VERSION(2,6,9) which is 132617 as [(2 << 16)+(6<<8)+9 ] . Does LINUX_VERSION_CODE and KERNEL_VERSION(2,6,9) calculates value differently ? Please correct me if I am wrong as I am understanding LINUX_VERSION_CODE and KERNEL_VERSION(2,6,9) . Thanks |
You can see these definitions in the top level Makefile of the Linux source tree. I pulled these from a 3.x series kernel source:
Code:
986 define filechk_version.h Particularly, an update to that file (<linux/version.h>) would result from running a make headers_install in the linux source tree. |
uname(2) is your friend
|
All times are GMT -5. The time now is 04:11 AM. |