http://tldp.org/LDP/lkmpg/2.6/html/x181.html
On 24 Ağu 2011, at 09:54, Srinidhi Rao <[email protected]> wrote: > Hi all, > > I am in the initial hard steps of learning the nuances of kernel programming, > as to begin what are all the modules (header files) to use its > data-structures be included to go about, as I tried this source: > src: http://tldp.org/LDP/lkmpg/2.6/html/x121.html > /* > * hello−1.c − The simplest kernel module. > */ > #include <linux/module.h> > /* Needed by all modules */ > #include <linux/kernel.h> > /* Needed for KERN_INFO */ > int init_module(void) > { > printk(KERN_INFO "Hello world 1.\n"); > /* > * A non 0 return means init_module failed; module can't be loaded. > */ > return 0; > } > void cleanup_module(void) > { > printk(KERN_INFO "Goodbye\n"); > } > > as compilation followed this: > box@x86:~$ cc kernel_hello.c > kernel_hello.c:3: fatal error: linux/module.h: No such file or directory > compilation terminated. > -- > Thanks and Regards, > Srinidhi. > ---- > All our knowledge has its origins in our perception. > -- Leonardo da Vinci. > ---- > Tell me and I forget. Teach me and I remember. Involve me and I learn. > -- Benjamin Franklin. > > _______________________________________________ > Kernelnewbies mailing list > [email protected] > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list [email protected] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
