]> Dogcows Code - chaz/tar/blobdiff - src/tar.c
Restore after an accidental remove
[chaz/tar] / src / tar.c
index 90f65922e81c0d01b3fbce2397f3d00d6200945e..b460211d6338ef750268741bbf588ef5e641974a 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
@@ -7,7 +7,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
@@ -617,7 +617,7 @@ static struct argp_option options[] = {
    N_("exclude directories containing CACHEDIR.TAG"), GRID+1 },
   {"exclude-tag", EXCLUDE_TAG_OPTION, N_("FILE"), 0,
    N_("exclude contents of directories containing FILE, except"
    N_("exclude directories containing CACHEDIR.TAG"), GRID+1 },
   {"exclude-tag", EXCLUDE_TAG_OPTION, N_("FILE"), 0,
    N_("exclude contents of directories containing FILE, except"
-      " for FILE itself"), GRID+1 }, 
+      " for FILE itself"), GRID+1 },
   {"exclude-tag-under", EXCLUDE_TAG_UNDER_OPTION, N_("FILE"), 0,
    N_("exclude everything under directories containing FILE"), GRID+1 },
   {"exclude-tag-all", EXCLUDE_TAG_ALL_OPTION, N_("FILE"), 0,
   {"exclude-tag-under", EXCLUDE_TAG_UNDER_OPTION, N_("FILE"), 0,
    N_("exclude everything under directories containing FILE"), GRID+1 },
   {"exclude-tag-all", EXCLUDE_TAG_ALL_OPTION, N_("FILE"), 0,
@@ -1539,15 +1539,15 @@ parse_opt (int key, char *arg, struct argp_state *state)
     case EXCLUDE_TAG_OPTION:
       add_exclusion_tag (arg, exclusion_tag_contents, NULL);
       break;
     case EXCLUDE_TAG_OPTION:
       add_exclusion_tag (arg, exclusion_tag_contents, NULL);
       break;
-      
+
     case EXCLUDE_TAG_UNDER_OPTION:
       add_exclusion_tag (arg, exclusion_tag_under, NULL);
       break;
     case EXCLUDE_TAG_UNDER_OPTION:
       add_exclusion_tag (arg, exclusion_tag_under, NULL);
       break;
-      
+
     case EXCLUDE_TAG_ALL_OPTION:
       add_exclusion_tag (arg, exclusion_tag_all, NULL);
       break;
     case EXCLUDE_TAG_ALL_OPTION:
       add_exclusion_tag (arg, exclusion_tag_all, NULL);
       break;
-      
+
     case FORCE_LOCAL_OPTION:
       force_local_option = true;
       break;
     case FORCE_LOCAL_OPTION:
       force_local_option = true;
       break;
@@ -2302,9 +2302,6 @@ main (int argc, char **argv)
   /* Make sure we have first three descriptors available */
   stdopen ();
 
   /* Make sure we have first three descriptors available */
   stdopen ();
 
-  /* Close all inherited open descriptors, except for the first three */
-  closeopen ();
-
   /* Pre-allocate a few structures.  */
 
   allocated_archive_names = 10;
   /* Pre-allocate a few structures.  */
 
   allocated_archive_names = 10;
@@ -2322,6 +2319,7 @@ main (int argc, char **argv)
   /* Decode options.  */
 
   decode_options (argc, argv);
   /* Decode options.  */
 
   decode_options (argc, argv);
+
   name_init ();
 
   /* Main command execution.  */
   name_init ();
 
   /* Main command execution.  */
@@ -2410,6 +2408,7 @@ tar_stat_destroy (struct tar_stat_info *st)
   free (st->gname);
   free (st->sparse_map);
   free (st->dumpdir);
   free (st->gname);
   free (st->sparse_map);
   free (st->dumpdir);
+  xheader_destroy (&st->xhdr);
   memset (st, 0, sizeof (*st));
 }
 
   memset (st, 0, sizeof (*st));
 }
 
This page took 0.021732 seconds and 4 git commands to generate.