From: Sergey Poznyakoff Date: Fri, 11 Nov 2005 00:25:41 +0000 (+0000) Subject: (write_extended): Change type and meaning of the first argument. All callers updated X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=b6d3432810ce8b001200e88ea4bd0251a063caf6;hp=1e8f6d41c4ef5b9dfc5223a65a8f92a8b93e3646;p=chaz%2Ftar (write_extended): Change type and meaning of the first argument. All callers updated --- diff --git a/src/create.c b/src/create.c index 6f553fe..ff69876 100644 --- a/src/create.c +++ b/src/create.c @@ -577,17 +577,27 @@ write_long_name (struct tar_stat_info *st) } union block * -write_extended (char type, struct tar_stat_info *st, union block *old_header) +write_extended (bool global, struct tar_stat_info *st, union block *old_header) { union block *header, hp; char *p; - + int type; + if (extended_header.buffer || extended_header.stk == NULL) return old_header; xheader_finish (&extended_header); memcpy (hp.buffer, old_header, sizeof (hp)); - p = xheader_xhdr_name (st); + if (global) + { + type = XGLTYPE; + p = xheader_ghdr_name (); + } + else + { + type = XHDTYPE; + p = xheader_xhdr_name (st); + } xheader_write (type, p, &extended_header); free (p); header = find_next_block (); @@ -852,7 +862,7 @@ finish_header (struct tar_stat_info *st, print_header (st, block_ordinal); } - header = write_extended (XHDTYPE, st, header); + header = write_extended (false, st, header); simple_finish_header (header); }