Michael D. Adams <[email protected]> ha escrit: > (I haven't tested 'g' headers. I haven't figured out a > way to get tar to generate them.
A global header is created if you supply at least one global keyword, e.g.: tar --pax-option 'comment=Test archive' -c -f ... (global keywords are defined using `keyword=value' syntax, as opposed to `keyword:=value', which defines per-member keywords). > Your patch works but has a bug. If I set the time to '@1' or any > non-zero value it works, but if I set it to '@0' or '1970-1-1 > 00:00:00Z', then it reverts back to placing the tar file's creation > time in there. Yes, of course: it was intended as a proof of concept; in the final version I will definitely not rely on comparison of the timestamp to 0 to decide if it was set. > Also I don't think C (at least prior to > C99) will always initialize exthdr_mtime to zero (compilers and OS may > vary). Even the very first C compiler would do it: the memory allocated for BSS was always initialized to zeroes, since the PDP times. Regards, Sergey
