From owner-freebsd-arch Tue Dec 21 10:35: 8 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id A657914EA5 for ; Tue, 21 Dec 1999 10:35:06 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id TAA23439 for ; Tue, 21 Dec 1999 19:35:05 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id TAA28037 for freebsd-arch@freebsd.org; Tue, 21 Dec 1999 19:35:05 +0100 (MET) Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id 6859E14E58 for ; Tue, 21 Dec 1999 10:34:58 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id KAA46534; Tue, 21 Dec 1999 10:34:48 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <199912211834.KAA46534@gndrsh.dnsmgr.net> Subject: Re: filemarks? In-Reply-To: from Bruce Evans at "Dec 21, 1999 08:34:32 pm" To: bde@zeta.org.au (Bruce Evans) Date: Tue, 21 Dec 1999 10:34:48 -0800 (PST) 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) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ... > > > 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