]> Dogcows Code - chaz/tar/commit
Fix listing of volume labels (in particular in PAX archives).
authorSergey Poznyakoff <gray@gnu.org.ua>
Fri, 22 Jan 2010 16:09:57 +0000 (18:09 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Sun, 24 Jan 2010 13:52:22 +0000 (15:52 +0200)
commit166b7c7d028c3dbcfded5c834b9bf752d2fb41f0
tree124887fd1dc8531533a9c075ae122e35298731c5
parentcd91cd3c629e3c489e5ab4650f443cdcfeec670a
Fix listing of volume labels (in particular in PAX archives).

* src/buffer.c (match_volume_label): Call set_volume_label.
(check_label_pattern): Get label string
as argument.
(match_volume_label): Handle volume labels stored in
global PAX headers.
* src/common.c (print_header,read_header): Change signature.
(read_header_primitive): Remove prototype.
* src/list.c (recent_global_header): New static.
(list_archive): Always print volume labels.
(read_header_primitive): Remove.
(read_header): Change the signature (all callers updated)
Save the recent global header.
(volume_label_printed): New static.
(simple_print_header): New function (ex-print_header).
(print_header): Change the signature (all callers updated).
For POSIX formats, print first volume header (if set).
* src/xheader.c (xheader_write_global): Write the data
accumulated in xhdr->stk even if keyword_global_override_list
is empty.
(xheader_read): On unexpected EOF, report error instead of
coredumping.
(XHDR_PROTECTED, XHDR_GLOBAL): New defines.
(struct xhdr_tab): Remove `protected' with `flags'. All uses updated.
(decg): If XHDR_GLOBAL bit is set, call the keyword's decode
method instead of adding it to `kwl'.

* src/compare.c: Update calls to read_header.
* src/create.c: Likewise.
* src/delete.c: Likewise.
* src/update.c: Likewise.
* src/extract.c: Likewise.
(extract_volhdr): Do not print "Reading <label>" statement, because
it is inconsistent: it is not printed if the volume begins with a
member continued from the previous volume.

* tests/label01.at: New testcase.
* tests/label02.at: New testcase.
* tests/Makefile.am, tests/testsuite.at: Add new testcases.
13 files changed:
src/buffer.c
src/common.h
src/compare.c
src/create.c
src/delete.c
src/extract.c
src/list.c
src/update.c
src/xheader.c
tests/Makefile.am
tests/label01.at [new file with mode: 0644]
tests/label02.at [new file with mode: 0644]
tests/testsuite.at
This page took 0.023589 seconds and 4 git commands to generate.