The code snippet is given below.  However, it just does not seem to work
:((. The code compiles perfectly but the function create_proc_entry returns
NULL everytime :(.


I tried it out on 2.4.20-6 (rh9). It works fine. Maybe you can post the complete code.


--Swapnil


#include <linux/module.h> #include <linux/kernel.h> #include <linux/proc_fs.h>

int init_mod() {

struct proc_dir_entry *entry;
char * filename = "spoon";
entry = create_proc_entry(filename,0444,(struct proc_dir_entry *)0);


        printk("%s: [%p] \n", "init_mod", entry);

        return 0;
}

void exit_mod() {
        return;
}

module_init(init_mod);
module_exit(exit_mod);


COde:
======

struct proc_dir_entry *entry;
char * filename = "spoon";
entry = create_proc_entry(filename,0444,(struct proc_dir_entry *)0);
...

--
______________________________________________________________________
Pune GNU/Linux Users Group Mailing List:      (plug-mail@plug.org.in)
List Information:  http://plug.org.in/mailing-list/listinfo/plug-mail
Send 'help' to [EMAIL PROTECTED] for mailing instructions.

Reply via email to