]> Dogcows Code - chaz/tar/blobdiff - src/sparse.c
Add xz support.
[chaz/tar] / src / sparse.c
index 93aee99ed63ae49a3301aa2b4ea17fdff512a6cb..9fde5080d5304a32253fd67d72e1a99a0c69bf56 100644 (file)
@@ -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
 
    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
    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);
 
       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)
       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;
        {
          free (file->stat_info->file_name);
          file->stat_info->file_name = save_file_name;
This page took 0.021478 seconds and 4 git commands to generate.