Article View: gnu.utils.bug
Article #1615GNU tar 1.05 bugs and fix
From: Bart Massey
Date: Fri, 19 May 1989 02:29
Date: Fri, 19 May 1989 02:29
123 lines
3731 bytes
3731 bytes
GNU tar is great! I'm really impressed -- it contains every feature I was
thinking about hacking into Berkeley tar!
But, I've had a few problems...
PROGRAM: GNU tar
VERSION: 1.05
MACHINE: VAX 750
OS: 4.3BSD "Tahoe"
PROBLEM:
Archive creation leaks memory, eventually causing a premature
out-of-memory exit.
REPEAT-BY:
Find a machine with 1.5g of disk. cd to the root, and
say "find . ! -type d -print > /tmp/list". Then say
"cat /tmp/list | tar cT -". Then wait. And wait.
SUGGESTED-FIX:
Somebody needs to run it with a allocation-tracking malloc. I
will get around to this if no one else is enthused.
PROBLEM:
The W option doesn't use MTIOCTOP to rewind the tape drive, even
on machines that support it. Also, this option prints "Verify"
for each file, which is really annoying.
REPEAT-BY:
tar cWf /dev/tape-drive-that-requires-MTIOCTOP .
Watch for the error message(s).
FIX:
Insert some forgotten includes into diffarch.c, and comment
out the annoying message.
*** /tmp/,RCSt1027805 Thu May 18 17:56:22 1989
--- diffarch.c Tue May 16 18:34:55 1989
***************
*** 34,39 ****
--- 34,46 ----
#include <sys/file.h>
#endif
+ #ifndef MSDOS
+ #include <sys/ioctl.h>
+ #ifndef USG
+ #include <sys/mtio.h>
+ #endif
+ #endif
+
#ifdef USG
#include <fcntl.h>
#endif
***************
*** 120,127 ****
--- 127,136 ----
userec(head); /* And go past it in the archive */
decode_header(head, &hstat, &head_standard, 1); /* Snarf fields */
+ #if 0
if(now_verifying)
fprintf(msg_file,"Verify ");
+ #endif
/* Print the record from 'head' and 'hstat' */
if (f_verbose)
print_header();
PROBLEM:
On a reasonable sized screen, the usage message scrolls the
error message off the top.
REPEAT-BY:
tar qqq
FIX:
The following patches make the usage message appear only when
the "-help" switch is given.
*** /tmp/,RCSt1027993 Thu May 18 19:27:15 1989
--- tar.c Thu May 18 16:38:43 1989
***************
*** 168,174 ****
case CMD_NONE:
fprintf (stderr,
"%s: you must specify exactly one of the r, c, t, x, or d options\n", tar);
- describe();
exit(EX_ARGSBAD);
}
exit(0);
--- 168,173 ----
***************
*** 274,282 ****
case 'h':
if(optind && argv[optind] && !strcmp(argv[optind],"-help")) {
! printf("This is GNU tar, the tape archiving program.\n");
describe();
! printf("For a more complete description of how to use tar, type 'info util tar'\n");
exit(1);
} else
f_follow_links++; /* follow symbolic links */
--- 273,281 ----
case 'h':
if(optind && argv[optind] && !strcmp(argv[optind],"-help")) {
! fprintf(stderr,"This is GNU tar, the tape archiving program.\n");
describe();
! fprintf(stderr,"For a more complete description of how to use tar, type 'info util tar'\n");
exit(1);
} else
f_follow_links++; /* follow symbolic links */
***************
*** 418,424 ****
case '?':
badopt:
! describe();
exit(EX_ARGSBAD);
}
--- 417,423 ----
case '?':
badopt:
! fprintf(stderr, "%s: bad option -- try -help\n", tar);
exit(EX_ARGSBAD);
}
Technical Details
Message-ID:
<5431@videovax.tv.Tek.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!tektronix!tekcrl!tekfdi!videovax!bartShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!tektronix!tekcrl!tekfdi!videovax!bart From: bart@videovax.tv.Tek.com (Bart Massey) Newsgroups: gnu.utils.bug Subject: GNU tar 1.05 bugs and fix Message-ID: <5431@videovax.tv.Tek.com> Date: 19 May 89 02:29:50 GMT Organization: Tektronix TV Measurement Systems, Beaverton OR Lines: 123