Subject: CVS commit: src/bin/pax
To: None <source-changes@NetBSD.org>
From: Christos Zoulas <email@example.com>
Date: 09/22/2004 15:03:18
Module Name: src
Committed By: christos
Date: Wed Sep 22 15:03:18 UTC 2004
src/bin/pax: extern.h file_subs.c tar.c
Keep track of the length of the gnu long name/link hack, so that
we can append to it. Modify the code so that file_write is re-entrant,
even in the gnu long name/link hack.
The old code assumed that the buffer already contained the necessary
blocks to satisfy the read file request that contained the long
filename. This is not always the case, specially when we are dealing
with pipes which do shorter reads, thus having more probability
that a long file name will fall across a buffer boundary.
To reproduce, create a tar archive with a lot of gnu-long-names
(pkgsrc/devel/libsigc++2 is a good example), do a tar -tf to get
a list of filenames, compress it and do a tar -tzf to get another
list of the filenames. Notice that the two lists differ.
To generate a diff of this commit:
cvs rdiff -r1.44 -r1.45 src/bin/pax/extern.h
cvs rdiff -r1.51 -r1.52 src/bin/pax/file_subs.c
cvs rdiff -r1.57 -r1.58 src/bin/pax/tar.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.