*BSD News Article 5543


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!uunet!know!mips2!cass.ma02.bull.com!think.com!ames!sgi!rigden.wpd.sgi.com!rpw3
From: rpw3@rigden.wpd.sgi.com (Rob Warnock)
Newsgroups: comp.unix.bsd
Subject: Re: DAT tape (SCSI) supported?
Message-ID: <q83j4c0@sgi.sgi.com>
Date: 24 Sep 92 05:46:47 GMT
Sender: rpw3@rigden.wpd.sgi.com
Organization: Silicon Graphics, Inc.  Mountain View, CA
Lines: 42

kuku@acds.physik.rwth-aachen.de writes:
+---------------
| rpw3@rigden.wpd.sgi.com (Rob Warnock) writes:
| >Sure. the "driver" is already there, in the normal SCSI driver. You just
| >need to make Scott Burris's 2-line fix for variable-block tape to "as.c",
| >and it works fine. I can exchange DAT tapes between 386bsd and SGI Indigos,
| >for example.
| 
| Good news. Could you repeat this two line fix, please?
+---------------

Something like this:

*** as.c.pl1    Mon Jul 13 21:34:06 1992
--- as.c        Sat Sep 19 02:59:22 1992
***************
*** 889,894 ****
--- 889,896 ----
        n = 0;
        sp = as->scatter_list;
        nscatter = 0;
+       if (as->tape && as->bs == 1)
+               total = bp->b_bcount;
        while (n < total && nscatter < NSCATTER) {
                thistime = page_size - ((vm_offset_t)p - trunc_page (p));

As I mentioned before, there is still a problem in the 0.1 SCSI driver with
reading a real end-of-file (which "tar" and "cpio" should never do, since
they have sentinel records), say, with "dd" or "cat". You get a console
message logged about "scsi resid = NNNN" where NNNN is whatever the count
was in the read() that hit the EOF. This is probably an off-by-one bug that
shows up when the amount read is zero bytes (i.e., "EOF"). Should be an
easy fix, but I haven't bother yet (since "tar" & "cpio" don't hit it).


-Rob

-----
Rob Warnock, MS-9U/510		rpw3@sgi.com
Silicon Graphics, Inc.		(415)390-1673
2011 N. Shoreline Blvd.
Mountain View, CA  94043