Re: reading /proc files larger than one buffer

Jeff Garzik (jgarzik@pobox.com)
Sat, 28 Sep 2002 16:31:28 -0400


Don Cohen wrote:
> If you follow the directions in Documentation/DocBook/procfs-guide.tmpl
> then your file read will not work correctly unless the whole file is
> read in one call.
>
> After examining (and experimenting with) fs/proc/generic.c I now see
> what you have to do: in addition to writing bytes in the page
> parameter, setting eof as appropriate and returning the number of
> bytes written, you also need to do:
> *start = page;
> At minimum the documentation should be corrected.

There is a new seq_xxx API that covers this quite well... the
documentation should be updated to include that, especially. seq_xxx
should take care of a large number of complex or potentially-large
procfs output.

Any change you would be interested in updating the docs? ;-)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/