On 6/15/07, Andrea Gasparini <gaspa@xxxxxxxxxxx> wrote:
> I want the data available to some functions inside the kernel to be
> available to my modules also. I thought i will generally call some
> extern funct from inside and then define it later from my modules which
> doesnt work. Now i am trying to do it through fucntion pointers which
> are exported so that i can change it in my module. still dont have the
> exact idea to accomplish the task .
Hi devvrat,
i can't understand exactly what you need to do, but maybe a solution can be
this: make a global simbol (i.e. a function pointer) that the kernel
should export.
so, there must be a kernel implementation of that function (also emtpy)
and a module implementation that could reassign as you like.
few steps,
kernel side:
void* foo_pointer;
EXPORT_SYMBOL( foo_pointer );
foo_pointer = empty_func;
void empty_func(void){};
module side:
include <somthing>
foo_pointer = something_other;
void something_other(void) {
// a lot of code... :P
}
could it works?
bye!
--
yeah thats what i said i was doing. I just compiled the kernel with that. Couldnt check it yet but i guess it will work. I got the idea from the way system call table is being exported and then hacked. Thanks a lot to all for replying. do tell me if there is another way to do it
regards
devvrat