Received: (from major@localhost)
	by minnie.cs.adfa.oz.au (8.8.5/8.8.5) id MAA18196
	for pups-liszt; Sat, 11 Apr 1998 12:46:16 +1000 (EST)
X-Authentication-Warning: minnie.cs.adfa.oz.au: major set sender to owner-pups@minnie.cs.adfa.oz.au using -f
Received: from renoir.op.net (root@renoir.op.net [209.152.193.4])
	by minnie.cs.adfa.oz.au (8.8.5/8.8.5) with ESMTP id MAA18185
	for <pups@minnie.cs.adfa.oz.au>; Sat, 11 Apr 1998 12:46:07 +1000 (EST)
Received: from goppelt.op.net (d-phlarc1-01.ppp.op.net [209.152.199.65]) by renoir.op.net (o1/$Revision: 1.16 $) with SMTP id WAA07389 for <pups@minnie.cs.adfa.oz.au>; Fri, 10 Apr 1998 22:45:58 -0400 (EDT)
Message-Id: <199804110245.WAA07389@renoir.op.net>
Comments: Authenticated sender is <edgee@cyberpass.net>
From: "Ed G." <edgee@cyberpass.net>
To: pups@minnie.cs.adfa.oz.au
Date: Fri, 10 Apr 1998 22:40:35 -0400
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Bob's Magtape Vindicated-Unix to Blame!
Reply-to: edgee@cyberpass.net
X-mailer: Pegasus Mail for Win32 (v2.54)
Sender: owner-pups@minnie.cs.adfa.oz.au
Precedence: bulk

I described in an earlier post how uv7 tar would fail, extracting the 
same file over and over again (see below for example).  

It turns out that Bob's magtape works just fine:  the problem is in 
tar!

uv7 tar has a bug in it--a misplaced assignment--which causes it to 
read the first block over and over (see below for example) when 
used with the 'f' option.  

The bug is indirectly a result of a trick tar uses to determine the
block size on the mag tape:  rather than interrogate Unix about the
block size (can someone tell me how do this?),  tar first attempts to 
read the maximum block size supported by tar (20*512 bytes).  The 
number of bytes actually returned is taken to be the actual block 
size and is used by tar for reads thereafter.

Two simple workarounds for /dev/rmt0 are:

tar vx0
and
tar vxfb /dev/rmt0 1
 
The problem:

# tar vxf /dev/rmt0
x mysqrt.c, 383 bytes, 1 tape blocks
x mysqrt.c, 383 bytes, 1 tape blocks
x mysqrt.c, 383 bytes, 1 tape blocks
x mysqrt.c, 383 bytes, 1 tape blocks
x mysqrt.c, 383 bytes, 1 tape blocks
etc.

