detecting kernel version via API or system call

Michelangelo Calatino michelangelo.calatino at adstorino.it
Wed Jun 30 08:42:18 UTC 2004


Hi folks, 
 
 I would like to check the kernel version, getting 
the same result as :

uname -r

but inside a C program.
Is there an API function or system call I can use ?
Otherwise I could always look into :

/usr/include/linux/version.h

but, perhaps there is shorter way ?
Thank you,

Michelangelo


---------------------------------------------------------------------------------------------------------------
ing. Michelangelo Calatino


If only God would give me some clear sign ! 
Like making a large deposit in my name in a Swiss bank.

Woody Allen, 1935- 



More information about the redhat-list mailing list