[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Determining kernel version (2.2 or 2.4) from within module?
On Fri, Apr 27, 2001 at 11:44:59AM -0500, Timur Tabi wrote:
> I have a module which compiles for both 2.2 and 2.4, using a couple #ifdef's
> for the differences. I want to be able to create a binary driver that loads on
> both 2.2 or 2.4, detecting at run-time which version it is. Two questions:
>
> 1. Can I use "insmod -f" to load a driver compiled for 2.2 under 2.4?
> 2. Is there a way to check the kernel version number from within a module?
You can not create a binary driver that will work with both kernel
versions, sorry. You also can't reliably create a binary kernel driver
that will work with more than just 1 specific kernel version.
Sorry,
greg k-h
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/