*BSD News Article 80234


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!nntp.coast.net!howland.erols.net!EU.net!main.Germany.EU.net!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: SCSI tape block size
Date: 7 Oct 1996 20:36:44 GMT
Organization: Private BSD site, Dresden
Lines: 27
Message-ID: <53bpks$fgs@uriah.heep.sax.de>
References: <8720ffxq0j.fsf@plm.xs4all.nl> <Dywpsz.BFH@bri.hp.com>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
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

aslater@jocko.bri.hp.com (Al Slater) wrote:

> You may be able to read the blocksize back by merely doing a scsi mode
> sense and looking at the block descriptor -- the block length is in
> bytes 5-7.

I don't think this would help:

uriah # scsi -v -f /dev/rst0.ctl -c "1a 0 0 0 v:i1 0" 12 -i 12 \
'*i4 {Density} i1 {Number of blocks} i3 *i1 {Block length} i3'
Density:  21 
Number of blocks:  0 
Block length:  0 

For a variable-mode recording, MODE SENSE reports a block length of 0.
The above is not for an HP drive, but i'm pretty sure they behave
identically.

Trying an oversized read() however should return the actual number of
bytes that have been read.

-- 
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. ;-)