Results 1 to 2 of 2
Hi,
I have this driver to program for school. It puts a proc/spying file that enables me see some strings i have entered in my mapped memory.... Anyways, i can't ...
- 11-29-2006 #1Just Joined!
- Join Date
- Nov 2006
- Posts
- 1
Proc file read function, help
Hi,
I have this driver to program for school. It puts a proc/spying file that enables me see some strings i have entered in my mapped memory.... Anyways, i can't find any help on this proc read function. Can someone tell me what the parameters are for ?
int procfile_read(char *buffer, char **buffer_location, off_t offset, int buffer_length, int *eof, void *data);
buffer = buffer to be filled (example cat /proc/spying. I have 4096 bytes to output).
buffer_location = ???
offset = ???
buffer_length = size of buffer to be filled (test shows that its set at 1024)
eof = ??? (always = 0)
data = ???
return value = ??? (it seems that if return 0, then reader stops. But my reader stops after 2 calls no matter what i return)
thank you.
- 11-30-2006 #2Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
A reference:
http://tldp.org/LDP/lkmpg/2.6/html/c708.html
Regards


Reply With Quote
