Module Programming...file not included
Hey, I'm just starting module programming and I can insert a simple module but when I try to include the file linux/kernel.h the things that are defined in that file dont get replaced in my program
Code:
I checked the include files and KERN_ALERT stands for "<1>" so i replace it in my source code and the code works fine so I'm sort of confused. I tried to make a test header file and stuck it in /usr/include and that came out fine. Neone haf ne ideas? :s |
That variable indeed gets defined in http://glide.stanford.edu/lxr/source...nux-2.6.10#L32
But my local /usr/include/linux/kernel.h doesn't have it (Fedora Core 2). Apparently the whole section controlled by __KERNEL__ is missing from my header file. Maybe I'd need to install some kernel development RPM package. As you say you found the macro in yours, chances are your header file is complete. Try defining the __KERNEL__ macro before any include, e.g., #define __KERNEL__ 1 I think you need that anyway to compile a kernel module. |
Thx for the reply...
yea I already defined the __KERNEL__ option at compile time. Still no go. |
All times are GMT -5. The time now is 06:46 PM. |