]> Dogcows Code - chaz/tar/blobdiff - src/tar.h
tar: more reliable directory traversal when creating archives
[chaz/tar] / src / tar.h
index 7f72f3ef723e54ec0fa84b4bc2530660cfb92cfc..c35ba5dd115ccb80f162815a9bd5bc66e2dd50e7 100644 (file)
--- a/src/tar.h
+++ b/src/tar.h
@@ -265,7 +265,7 @@ enum archive_format
 struct sp_array
 {
   off_t offset;
-  size_t numbytes;
+  off_t numbytes;
 };
 
 struct xheader
@@ -311,12 +311,24 @@ struct tar_stat_info
 
   /* Extended headers */
   struct xheader xhdr;
-  
+
   /* For dumpdirs */
   bool is_dumpdir;          /* Is the member a dumpdir? */
   bool skipped;             /* The member contents is already read
                               (for GNUTYPE_DUMPDIR) */
   char *dumpdir;            /* Contents of the dump directory */
+
+  /* Parent directory, if creating an archive.  This is null if the
+     file is at the top level.  */
+  struct tar_stat_info *parent;
+
+  /* File descriptor, if creating an archive, and if a directory or a
+     regular file or a contiguous file.  This is AT_FDCWD if it is the
+     working directory, which is possible only for a dummy parent node
+     just above the top level.  It may be -1 if the file could not be
+     opened.  Zero represents an otherwise-uninitialized value;
+     standard input is never used here.  */
+  int fd;
 };
 
 union block
This page took 0.023567 seconds and 4 git commands to generate.