From nobody  Thu May  8 18:23:09 1997
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.5/8.8.5) id SAA01131;
          Thu, 8 May 1997 18:23:09 -0700 (PDT)
Message-Id: <199705090123.SAA01131@hub.freebsd.org>
Date: Thu, 8 May 1997 18:23:09 -0700 (PDT)
From: aloke@vicor-nb.com
To: freebsd-gnats-submit@freebsd.org
Subject: the -L option of tar does not work properly with long tape lengths
X-Send-Pr-Version: www-1.0

>Number:         3553
>Category:       gnu
>Synopsis:       the -L option of tar does not work properly with long tape lengths
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May  8 18:30:03 PDT 1997
>Closed-Date:    Thu May 8 21:26:59 PDT 1997
>Last-Modified:  Tue May 28 17:50:03 PDT 2002
>Originator:     Aloke
>Release:        2.2.1-RELEASE
>Organization:
Vicor Inc.
>Environment:
FreeBSD soundy.vicor-nb.com 2.2.1-RELEASE FreeBSD 2.2.1-RELEASE #0: Thu May  8 11:27:18  1997     aloke@soundy.vicor-nb.com:/usr/src/sys/compile/NEXUS  i386

>Description:
GNU tar version 1.11.2. The -L option to tar is supposed to specify the length of the tape in K,
but when the number is large (I was using 3145000 to specify a 3Gig tape)
the user is prompted to mount a second volume too soon. A look
at the source shows the tape_length variable to be a signed int, instead
of unsigned.
>How-To-Repeat:
tar -c -v -M -L 3145000 -f /dev/rst0 .
where "." is populated with some large files (in my case, 2 files
of 64 Meg and 44 Meg). tar will ask for the 2nd volume to be written
MUCH before having written 3gigs.
>Fix:
in /usr/src/gnu/usr.bin/tar/buffer.c changed 
"static long bytes_written = 0;" to "static unsigned long bytes_written = 0; "

in /usr/src/gnu/usr.bin/tar/tar.h changed
"TAR_EXTERN int tape_length;" to "TAR_EXTERN unsigned long tape_length;"
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Thu May 8 21:26:59 PDT 1997 
State-Changed-Why:  
This is a duplicate of PR#3552.  Please only submit bug 
reports once.  Thanks. 

From: j@uriah.heep.sax.de (J Wunsch)
To: aloke@vicor-nb.com
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: gnu/3553: the -L option of tar does not work properly with long tape lengths
Date: Fri, 9 May 1997 10:32:00 +0200

 As aloke@vicor-nb.com wrote:
 
 > GNU tar version 1.11.2. The -L option to tar is supposed to specify
 > the length of the tape in K, but when the number is large (I was
 > using 3145000 to specify a 3Gig tape) the user is prompted to mount
 > a second volume too soon. A look at the source shows the tape_length
 > variable to be a signed int, instead of unsigned.
 
 That won't help very much.  Bumping the limit from 2 GB to 4 GB
 probably ain't worth the while.  Either, it should be made a 64-bit
 entity at all (but that's probably quite a little more of work), or
 it's too small for many current tape drives already.
 
 Silly question: why do you want to specify -L at all?  It is only
 required for broken hardware/drivers.  The floppy disk driver used to
 be broken until FreeBSD 2.2 and required it, but to the best of my
 knowledge, the tape drivers were always able to correctly report EOF
 back to the caller.
 
 -- 
 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. ;-)

From: j@uriah.heep.sax.de (J Wunsch)
To: aloke@vicor-nb.com
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: gnu/3553: the -L option of tar does not work properly with long tape lengths
Date: Fri, 9 May 1997 10:32:00 +0200

 As aloke@vicor-nb.com wrote:
 
 > GNU tar version 1.11.2. The -L option to tar is supposed to specify
 > the length of the tape in K, but when the number is large (I was
 > using 3145000 to specify a 3Gig tape) the user is prompted to mount
 > a second volume too soon. A look at the source shows the tape_length
 > variable to be a signed int, instead of unsigned.
 
 That won't help very much.  Bumping the limit from 2 GB to 4 GB
 probably ain't worth the while.  Either, it should be made a 64-bit
 entity at all (but that's probably quite a little more of work), or
 it's too small for many current tape drives already.
 
 Silly question: why do you want to specify -L at all?  It is only
 required for broken hardware/drivers.  The floppy disk driver used to
 be broken until FreeBSD 2.2 and required it, but to the best of my
 knowledge, the tape drivers were always able to correctly report EOF
 back to the caller.
 
 -- 
 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. ;-)

From: Marc Perisa <perisa@porsche.de>
To: freebsd-gnats-submit@FreeBSD.org, mjacob@FreeBSD.org
Cc:  
Subject: Re: gnu/3553: the -L option of tar does not work properly with long
 tape lengths
Date: Wed, 29 May 2002 02:43:34 +0200

 Please close this PR. It is better described at
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=gnu/24903
 
 Thanks
 
 Marc
 
 
 
>Unformatted:
