Hi I have some errors during module compilation.
It's a char device.
My module looks like this (a small part):
.
.
.
#include <linux/fs.h>
.
.
.
static struct file_operations xxx = {
owner:THIS_MODULE,
open:device_open,
release:device_release
.Quote:};
.
but the errors during compilation point at the shown part of code.
these are the compiler(gcc) messages:
mod.c:81: variable 'xxx' has initializer but incomplete type
mod.c:82: unknown field 'owner' specified in initializer
and so on....
I'm shure that this kind of declaration of struct xxx is right in
kernels > 2.4.0. So why does the compiler complain? I'm also 100% shure that
there exist fields 'owner', 'open', etc. Just look at the code
$(your_include_dir)/linux/fs.h
Any solution? What's wrong with the initialization variable xxx of
file_operations type?
ps: I spend 16 hours reading the kernel code and docomentation and now I'm
getting a bit confused ;) that's why I decided to write this post.
Mario
--
http://linuxfocus.org