[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] format v7 unexpected header fields
From: |
Joerg Schilling |
Subject: |
Re: [Bug-tar] format v7 unexpected header fields |
Date: |
Thu, 12 Nov 2015 12:16:36 +0100 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Mario Aichinger <address@hidden> wrote:
> Last week I did a research about the v7 format. I did this, because I
> wanted to push my programming skills and thought, why not to program a tar
> extractor. So I started reading about the most basic tar format which is
> obviously v7. The first thing I programed was the part which tries to find
> out which version of archive is passed to my program (v7, star, ustar, gnu,
> posix, pax, ...). My understanding was and is that v7 tar's have a 256 byte
> padding (null bytes) at the end of their headers, and an empty magic
> header field. So these are the things I test against. After I implemented
> this in my program I created some test archives. Of course with tar and the
> option --format=v7. But my program failed to detect them as v7 tar's. So I
> opened them (the archives) in a text editor (kate) and found two fields in
> the header filled with zeros. This fields where located after the linkname
> header field.
gtar is not very clean with format switching. Last time I checked, it did even
create gnu long name headers when other formats have been selected.
I recommend you to rather use "star H=v7tar"
Jörg
--
EMail:address@hidden (home) Jörg Schilling D-13353 Berlin
address@hidden (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.org/private/
http://sourceforge.net/projects/schilytools/files/'