Hi All,
I am trying to compile this dynamic module that
creates a readable procs entry.
I invoke gcc as follows.
gcc -DMODULE -D_KERNEL_ -I /lib/modules/`uname
-r`\build/modules -c fMod3.c
and I get a whole bunch of errors with procfs.h.
/lib/modules/2.4.18-4GB/build/include/linux/proc_fs.h:47:
parse error before `off_t'
/lib/modules/2.4.18-4GB/build/include/linux/proc_fs.h:50: warning:
`struct file' declared inside parameter list
Could any of you offer me any hints to resolve this problem? I am using SUSE with Kernel 2.4.18-4GB. Thanks in advance for any feedback. Murali ------------------------------------------------------------------------------------------------------------- #include <linux/module.h> #define MODULE_VERSION "1.0" #define FOOBAR_LEN 8 struct fb_data_t
static struct proc_dir_entry *example_dir,*foo_file; static int proc_read_foo(char *page,char **start,off_t off,int count,int
*eof,void *data) static int __init
init_procfs_example(void) strcpy(foo_data.name,
"foo"); no_foo: remove_proc_entry("jiffies",
example_dir);
printk(KERN_INFO "%s %s
removed\n",MODULE_NAME, MODULE_VERSION); module_init(init_procfs_example); MODULE_AUTHOR("XYZ"); EXPORT_NO_SYMBOLS;
|