Need help in exporting Functions to kernel
How can i export my own function written in C file added to kernel which can be used by my own module mod1.c. mod1.c is a kernel modules file that is compiled with other modules in make modules command. but i am getting some warnings how can i remove it?
mod1.c: In function `hook_func1': > mod1.c:29: warning: implicit declaration of function `funmy' > mod1.c:29: warning: assignment makes pointer from integer without a cast where funmy is function defined in finalmy.c which is also get compiled. when i did make make install get following error depmod: *** Unresolved symbols in /lib/modules/2.4.24/kernel/net/ipv4/mod1.o depmod: funmy Also when finalmy.c is also get compiled finalmy1.c:31: warning: type defaults to `int' in declaration of `EXPORT_SYMBOL' finalmy1.c:31: warning: parameter names (without types) in function declaration finalmy1.c:31: warning: data definition has no type or storage class snippet of warning part of my module mod1.c is line 29: text=funmy(mystruct->data); where variable data is unsigned char *data; In finalmy.c unsigned char *funmy(unsigned char *data) { ..... ........ return (str1); } EXPORT_SYMBOL(funmy; |
All times are GMT -5. The time now is 04:40 AM. |