From owner-freebsd-scsi Wed Dec 10 16:23:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA08573 for freebsd-scsi-outgoing; Wed, 10 Dec 1997 16:23:10 -0800 (PST) (envelope-from owner-freebsd-scsi) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA08492 for ; Wed, 10 Dec 1997 16:22:48 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.8.8/8.8.8) with UUCP id BAA15523 for scsi@freebsd.org; Thu, 11 Dec 1997 01:22:45 +0100 (CET) (envelope-from j@uriah.heep.sax.de) Received: (from j@localhost) by uriah.heep.sax.de (8.8.8/8.8.5) id AAA09340; Thu, 11 Dec 1997 00:59:05 +0100 (MET) Message-ID: <19971211005904.40551@uriah.heep.sax.de> Date: Thu, 11 Dec 1997 00:59:04 +0100 From: J Wunsch To: scsi@freebsd.org Subject: Re: Questions about mt and SCSI subsystem Reply-To: Joerg Wunsch References: <199712100037.SAA25972@nospam.hiwaay.net> <199712100243.TAA18226@narnia.plutotech.com> <19971210093732.48185@uriah.heep.sax.de> <348F08D6.63DABEB6@whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88 In-Reply-To: <348F08D6.63DABEB6@whistle.com>; from Julian Elischer on Wed, Dec 10, 1997 at 01:25:43PM -0800 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Julian Elischer wrote: > I'd offer to fix it if I could be told what he right thing to do is.. > but I don't have a tape drive here at all.. It's probably hard to fix without having a tape drive -- i gave up fixing it even with a drive. ;-) The correct behaviour is that any read or write attempt, upon encountering EOF (read) or EOM (write) should return a `short' read/write (i.e., set b_resid accordingly), but shall not flag an error condition. Offhand i'm not sure what should happen if you are exactly at EOF, and try to read on, but still i think read(2) should just return 0 but no error. Basically, you need to be consistent with normal file IO (although there's no such thing like `EOM' for writing files). -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)