Inconsistencies?

=?ISO-8859-1?Q? (jorgen@wermland.se)
Wed, 25 Mar 1998 13:25:40 +0100


I've just run into some problems while writing a proc-entry. The problem is
inconsistency in function pointer 'types'. I did as Luke, I used the source and

found something odd.

In include/linux/fs.h the file_operations struct defines a read function as
follows:
struct file_operations {
...
ssize_t (*read) (struct file *, char *, size_t, loff_t *);
...
};

In fs/proc/net.c this read-function pointer gets the address of the following
function (also located in fs/proc/net.c):

static long proc_readnet(struct inode * inode, struct file * file,
char * buf, unsigned long count)

As one can see, the file_operations::read function pointer is not compatible
with proc_readnet.

Did I miss something or is proc_readnet one of those evil hacks ;)? I know for
sure that proc_readnet works (at least I can cat /proc/net/tcp and such).

I am using linux 2.1.90 with prepatch 1.

Regards, Jorgen.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu