From: Andries Brouwer <aebr@win.tue.nl>
To: Andrew Morton <akpm@zip.com.au>
Cc: Phil Auld <pauld@egenera.com>, linux-kernel@vger.kernel.org
Subject: Re: why is lseek broken (>= 2.4.11) ?
Date: Fri, 9 Aug 2002 23:13:06 +0200 [thread overview]
Message-ID: <20020809211306.GA1252@win.tue.nl> (raw)
In-Reply-To: <3D542AAE.64B70B55@zip.com.au>
On Fri, Aug 09, 2002 at 01:48:47PM -0700, Andrew Morton wrote:
> What should the behaviour be? The lseek should succeed,
Yes
> but subsequent reads and writes return zero?
Yes. The first read must return 0. Subsequent reads may return 0
or return the ENXIO error.
For read: "No data transfer shall occur past the current end-of-file.
If the starting position is at or after the end-of-file, 0 shall be
returned. If the file refers to a device special file, the result of
subsequent read() requests is implementation-defined."
ENXIO: "the request was outside the capabilities of the device".
For write: "If a write() requests that more bytes be written than
there is room for (for example, ... the physical end of a medium),
only as many bytes as there is room for shall be written.
Andries
next prev parent reply other threads:[~2002-08-09 21:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-09 12:49 why is lseek broken (>= 2.4.11) ? Phil Auld
2002-08-09 20:48 ` Andrew Morton
2002-08-09 21:13 ` Andries Brouwer [this message]
2002-08-09 21:42 ` Phil Auld
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=20020809211306.GA1252@win.tue.nl \
--to=aebr@win.tue.nl \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=pauld@egenera.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox