[ale] Programming /proc
Benjamin Dixon
beatle at arches.uga.edu
Thu Nov 15 01:57:50 EST 2001
Hi all,
I'm trying to write a kernel module that has proc support but I don't
fully understand the new calling procedures under 2.4. I have successfully
set up my module code (easy enough) and now I want to let the user access
some information using my output function which I register for "read" in a
file_operations structure. So my function prototype looks like this:
static ssize_t output(struct file *file, char *buffer, size_t len,
loff_t *offset);
My only problem is, I'm not entirely sure how to handle the *file. Does
anyone know where that structure is defined? I've searched through the
kernel, specifically includes, but can't find it. And more generally, does
anyone know of a good resource for *2.4 kernel* /proc programming, its a
bit different from 2.2 and previous kernels and I can't find any updated
information. (BTW, I did find a procfs_example.c file in the Documentation
directory but it doesn't tell me what I want to know, which is what those
structures look like).
Ben
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list