]> Dogcows Code - chaz/tar/commitdiff
(write_extended): Change type and meaning of the first argument. All callers updated
authorSergey Poznyakoff <gray@gnu.org.ua>
Fri, 11 Nov 2005 00:25:41 +0000 (00:25 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Fri, 11 Nov 2005 00:25:41 +0000 (00:25 +0000)
src/create.c

index 6f553fe1077a280778658b2f22092942041456b1..ff69876192dcdf8a084d4b017acb5cd64266f6da 100644 (file)
@@ -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);
 }
 \f
This page took 0.028059 seconds and 4 git commands to generate.