[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: kernel module programming

Hi Manish,

>>>>> "manish" == manish arya <manish_arya@xxxxxxxxxxxxxx> writes:

    manish> hi all i am developin a kernel module in which i need to
    manish> read and parse som config files.i was tryin to use
    manish> fopen(),fscanf() etc defined in stdio.h. but after
    manish> compilation when i insert the module it says

A kernel module is not the same as an application.  You cannot use the
normal C library inside a module, you can only use functions exported
by kernel.  The C routines like fopen() etc. depend on system calls
which obviously can never be called inside a kernel module.

The Book "Linux Device Drivers", 2nd edition is now free (libre), read
the section "Kernel Modules Versus Applications" here:

Hope this helps,

Cricket scoreboard for linux 
For more info, visit http://scoreboard.sourceforge.net