X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fsparse.c;h=9fde5080d5304a32253fd67d72e1a99a0c69bf56;hb=bdb9de4b1ed44d7ea66d047ada9ee21746998f4c;hp=93aee99ed63ae49a3301aa2b4ea17fdff512a6cb;hpb=99527fa17bacf65ee2bd009f520a8b9a4bd38075;p=chaz%2Ftar diff --git a/src/sparse.c b/src/sparse.c index 93aee99..9fde508 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -4,7 +4,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any later + Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but @@ -945,16 +945,19 @@ pax_dump_header_0 (struct tar_sparse_file *file) file->stat_info->file_name = xheader_format_name (file->stat_info, "%d/GNUSparseFile.%p/%f", 0); - xheader_string_begin (); + xheader_string_begin (&file->stat_info->xhdr); for (i = 0; i < file->stat_info->sparse_map_avail; i++) { if (i) - xheader_string_add (","); - xheader_string_add (umaxtostr (map[i].offset, nbuf)); - xheader_string_add (","); - xheader_string_add (umaxtostr (map[i].numbytes, nbuf)); + xheader_string_add (&file->stat_info->xhdr, ","); + xheader_string_add (&file->stat_info->xhdr, + umaxtostr (map[i].offset, nbuf)); + xheader_string_add (&file->stat_info->xhdr, ","); + xheader_string_add (&file->stat_info->xhdr, + umaxtostr (map[i].numbytes, nbuf)); } - if (!xheader_string_end ("GNU.sparse.map")) + if (!xheader_string_end (&file->stat_info->xhdr, + "GNU.sparse.map")) { free (file->stat_info->file_name); file->stat_info->file_name = save_file_name;