Paul Eggert <[EMAIL PROTECTED]> wrote:
> Gunnar Ritter <[EMAIL PROTECTED]> writes:
> > Joerg Schilling <[EMAIL PROTECTED]> wrote:
> >> The standard requires the tar archives to be blocked with a multiple of
> >> 512 bytes.
> > And what, exactly, is the point in requiring this when reading parts of
> > archives that are completely meaningless?
> Minor reasons, I suspect. It reflects historical practice.
Really? 7th edition tar checks the number of bytes returned after the
first call to read() only. It then assumes that all following read()
calls return the same size and will thus simply ignore any junk at the
end unless the archive is very small. The same applies to 4.3BSD tar
and probably to many System V derivatives too.
> It allows programs like "tar" to warn the user in some cases where
> junk has been accidentally appended to the archive.
As you say, even GNU tar only does this "in some cases" so if you
actually see an advantage here, it is currently not reliable. In
particular, GNU tar just ignores any amount of junk that exceeds
a few blocks.
Also some traditional tar implementations (7th edition and many
System V derivatives) do not truncate an existing regular file when
they write an archive onto it. Junk beyond the end of the archive
is thus a regular condition with them.
> It allows programs to copy tar archives to archival devices that
> accept data only in 512-byte blocks.
I am referring to the behavior of tar when reading archives. It
should certainly align its output.
Gunnar
_______________________________________________
Bug-tar mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-tar