Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Posts
    1

    Question 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.

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •