From: Thomas Hood <jdthood@mail.com>
To: Andreas Schwab <schwab@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: proc_file_read bug?
Date: 25 Jan 2002 10:00:12 -0500 [thread overview]
Message-ID: <1011970816.1342.10.camel@thanatos> (raw)
In-Reply-To: <jer8oesdv4.fsf@sykes.suse.de>
In-Reply-To: <1011965794.1338.6.camel@thanatos> <jer8oesdv4.fsf@sykes.suse.de>
On Fri, 2002-01-25 at 09:29, Andreas Schwab wrote:
> |> /* This is a hack to allow mangling of file pos independent
> |> * of actual bytes read. Simply place the data at page,
> |> * return the bytes, and set `start' to the desired offset
> |> * as an unsigned int. - Paul.Russell@rustcorp.com.au
> |> */
> It is documented, RTFC.
Comment or Code? The comment is somewhat ambiguous and incorrect.
Reading the code, I take it that "start" is either a pointer into
the buffer where the string of n data bytes starts, or else
(when it is assigned a value less than the beginning of the buffer)
it is a special value by which the file offset is to be adjusted,
instead of n. Thus the comment might be clarified:
/*
* This is a hack to allow adjusting the file offset
* by a number different from the number of bytes read.
* Simply place the data at page, return the number of
* bytes read, and set "start" to the (signed long) amount
* by which the file offset is to be increased or
* decreased
*/
My question then is: why would one want to adjust the file
offset other than by +n?
--
Thomas
next prev parent reply other threads:[~2002-01-25 15:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-25 13:36 proc_file_read bug? Thomas Hood
2002-01-25 14:29 ` Andreas Schwab
2002-01-25 15:00 ` Thomas Hood [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-01-27 0:19 Thomas Hood
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=1011970816.1342.10.camel@thanatos \
--to=jdthood@mail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwab@suse.de \
/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