]> Dogcows Code - chaz/tar/blobdiff - src/tar.h
tar: more reliable directory traversal when creating archives
[chaz/tar] / src / tar.h
index 08ccab3405d2152b6a0cce0fd83fdda5f736a2f9..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
@@ -317,6 +317,18 @@ struct tar_stat_info
   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.02142 seconds and 4 git commands to generate.