From: Jeff Garzik <jgarzik@pobox.com>
To: Don Cohen <don-temp5298413@isis.cs3-inc.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: reading /proc files larger than one buffer
Date: Sat, 28 Sep 2002 16:31:28 -0400 [thread overview]
Message-ID: <3D9611A0.3080905@pobox.com> (raw)
In-Reply-To: 200209282010.g8SKASL01208@isis.cs3-inc.com
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? ;-)
next prev parent reply other threads:[~2002-09-28 20:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-28 20:10 reading /proc files larger than one buffer Don Cohen
2002-09-28 20:31 ` Jeff Garzik [this message]
2002-09-28 21:05 ` Don Cohen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D9611A0.3080905@pobox.com \
--to=jgarzik@pobox.com \
--cc=don-temp5298413@isis.cs3-inc.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox