From: Thomas Hood <jdthood@mail.com>
To: Todd Inglett <tinglett@vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: proc_file_read() hack?
Date: 25 Mar 2002 14:45:55 -0500 [thread overview]
Message-ID: <1017085557.5263.335.camel@thanatos> (raw)
In-Reply-To: <3C9F69F4.3010908@vnet.ibm.com>
Unfortunately, your method #3 conflicts with methods #0 through #2,
which exhaust the range of possible values that may be returned
in *start. Any value greater than buffer is regarded as being
"within the buffer".
Introducing method #1 was a bad idea because this hack made it
impossible cleanly to implement what you suggest.
--
Thomas Hood
On Mon, 2002-03-25 at 13:18, Todd Inglett wrote:
> How about applying my trivial patch and then adding this to your nice
> comment?
>
> 3) Set *start = an address outside the buffer.
> Put the data of the requested offset at *start.
> Return the number of bytes of data placed there.
> If this number is greater than zero and you
> didn't signal eof and the reader is prepared to
> take more data you will be called again with the
> requested offset advanced by the number ob tyes
> absorbed.
>
> The code should still work with the other cases now that the hack is
> fixed. Of course, rather than add 3), it would be better to re-word 2)
> (e.g. "Set *start = address of the buffer which may or may not be in the
> given buffer.).
>
> There are cases where the data is available and need not be copied. My
> code got simpler when I got rid of the need to copy my data around.
next prev parent reply other threads:[~2002-03-25 19:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-23 11:40 proc_file_read() hack? J.D. Hood
2002-03-25 18:18 ` Todd Inglett
2002-03-25 19:45 ` Thomas Hood [this message]
2002-03-27 18:26 ` Todd Inglett
2002-03-28 1:02 ` Thomas Hood
2002-03-28 15:29 ` Todd Inglett
-- strict thread matches above, loose matches on Subject: below --
2002-03-22 14:34 Todd Inglett
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=1017085557.5263.335.camel@thanatos \
--to=jdthood@mail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tinglett@vnet.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.