From owner-freebsd-bugs Thu May 8 18:30:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA01358 for bugs-outgoing; Thu, 8 May 1997 18:30:03 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA01345; Thu, 8 May 1997 18:30:01 -0700 (PDT) Resent-Date: Thu, 8 May 1997 18:30:01 -0700 (PDT) Resent-Message-Id: <199705090130.SAA01345@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, Received:(from nobody@localhost) by.hub.freebsd.org.id.SAA01131;Thu; (8.8.5/8.8.5);, 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 X-Send-Pr-Version: www-1.0 Subject: gnu/3552: the -L option of tar does not work properly with long tape lengths Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 3552 >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: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 8 18:30:01 PDT 1997 >Last-Modified: >Originator: Aloke >Organization: Vicor Inc. >Release: 2.2.1-RELEASE >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;" >Audit-Trail: >Unformatted: