Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Dec 1999 10:34:48 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        mjacob@feral.com (Matthew Jacob), freebsd-arch@freebsd.org, syssgm@detir.qld.gov.au (Stephen McKay), grog@lemis.com (Greg Lehey), rb@gid.co.uk (Bob Bishop), rivers@dignus.com (Thomas David Rivers), joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch), hf@Melog.DE (Hauke Fath)
Subject:   Re: filemarks?
Message-ID:  <199912211834.KAA46534@gndrsh.dnsmgr.net>
In-Reply-To: <Pine.BSF.4.10.9912211946160.11122-100000@alphplex.bde.org> from Bruce Evans at "Dec 21, 1999 08:34:32 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
...
> > > We seem to have 3 cases when Early Warning is detected:
> > > ...
> 
> > > b)  The write(2) was not completed, some bytes did make it to the tape.
> > >     If _some_ bytes made it we should return how many did and set the
> > >     Early Warning flag as in a).  If no bytes made it we return 0, which
> > >     is a degenerative case, no quite covered by the definition of
> > >     RETURN VALUE but in wide usage.
> 
> This is in narrow or nonexistent usage.  POSIX requires returning -1/ENOSPC
> if "there is no space on the device".  The only reasonable interpretation
> of a return value of 0 is that there is some space, but not this time.

AHhh... BSD dump is probably the #1 consumer of the write(2) call with
respect to tape drives and:
                        if (wrote == 0)
                                eot_count++;

And if I recall my read of the amanda tape driver code it does the
exact same thing.

I would say that is not ``narrow or nonexistent''.

-- 
Rod Grimes - KD7CAX @ CN85sl - (RWG25)               rgrimes@gndrsh.dnsmgr.net




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912211834.KAA46534>