mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Phil Auld <pauld@egenera.com>
To: Andries Brouwer <aebr@win.tue.nl>
Cc: Andrew Morton <akpm@zip.com.au>, linux-kernel@vger.kernel.org
Subject: Re: why is lseek broken (>= 2.4.11) ?
Date: Fri, 9 Aug 2002 17:42:32 -0400	[thread overview]
Message-ID: <20020809174232.Z3542@vienna.EGENERA.COM> (raw)
In-Reply-To: <20020809211306.GA1252@win.tue.nl>; from aebr@win.tue.nl on Fri, Aug 09, 2002 at 11:13:06PM +0200

Rumor has it that on Fri, Aug 09, 2002 at 11:13:06PM +0200 Andries Brouwer said:
> 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.
> 

Agreed. That is what the standards say... And what userspace has come to expect.


Phil


> 
> Andries
> -
> 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/

-- 
Philip R. Auld, Ph.D.                  Technical Staff 
Egenera Corp.                        pauld@egenera.com
165 Forest St., Marlboro, MA 01752       (508)858-2600

      reply	other threads:[~2002-08-09 21:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-09 12:49 Phil Auld
2002-08-09 20:48 ` Andrew Morton
2002-08-09 21:13   ` Andries Brouwer
2002-08-09 21:42     ` Phil Auld [this message]

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=20020809174232.Z3542@vienna.EGENERA.COM \
    --to=pauld@egenera.com \
    --cc=aebr@win.tue.nl \
    --cc=akpm@zip.com.au \
    --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

all inboxes | Powered by JetHome®