[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: storeio and libstore bugs

From: Thomas Bushnell, BSG
Subject: Re: storeio and libstore bugs
Date: 11 Mar 2002 00:04:23 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Roland McGrath <roland@frob.com> writes:

> > when reading past the end of a storeio provided file, you get EIO because
> > offset is equal to the size of the underlying store, but the only offset
> > check is in dev_rw:
> EIO is reasonable for a read some distance off the end of the store.
> Reading precisely at the end should report EOF (return success with 0 bytes).
> I checked in a change that should do that.

Historically, this is not how character devices worked for most Unixes
that I'm familiar with.  You didn't get ever really get eof; you just
got EIO if you asked for a block that doesn't exist.  "Character"
devices (really raw devices) required that you always do aligned reads
of an integral nonzero number of real blocks; no eof, and you got EIO
for any other condition.

Hurd devices are really much more like Unix block devices, however,
and those of course permit reading at any byte of any amount, and
should return eof, of course.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]