Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Dec 2003 09:07:13 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Nate Lawson <nate@root.org>
Subject:   Re: cvs commit: src/lib/libc_r/uthread uthread_write.c
Message-ID:  <Pine.GSO.4.10.10312180904220.23200-100000@pcnet5.pcnet.com>
In-Reply-To: <20031218164341.J19119@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 18 Dec 2003, Bruce Evans wrote:

> On Wed, 17 Dec 2003, Nate Lawson wrote:
> 
> > On Wed, 17 Dec 2003, Daniel Eischen wrote:
> > > On Wed, 17 Dec 2003, Nate Lawson wrote:
> > > > On Wed, 17 Dec 2003, Daniel Eischen wrote:
> > > > > Does this fix something other than bacula?
> > > >
> > > > Anyone else who expected this semantics.  I have no specific examples.
> > >
> > > I think it probably only pertinent to writing to tape devices
> > > where a 0 return means end of tape.  Otherwise you should
> 
> Do mean "writing to tape devices with a broken device driver that
> returns 0 to mean end of tape".  POSIX seems to be clear enough saying
> that write() returns -1 except on successful completion.  I don't
> believe write() with a nonzero count is successful if it can write
> nothing.

I think returning 0 to mean end-of-tape is an historical behavior.
We should probably be returning -1 and ENOSPC.

-- 
Dan Eischen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10312180904220.23200-100000>