summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-28 11:17:37 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-28 11:17:37 +0200
commit1582ca88cb056d84a93cd40731d362083dad8cd4 (patch)
tree4f3bc49418c2277676e61425225920c972274e7e /include
parent154532d71c447e73c70ec06d26628bb6919b9a5a (diff)
Add basic support for the GNU tar format
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/tar.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/tar.h b/include/tar.h
index 3b7c8eb..4da04f5 100644
--- a/include/tar.h
+++ b/include/tar.h
@@ -29,8 +29,27 @@ typedef struct {
char gname[32];
char devmajor[8];
char devminor[8];
- char prefix[155];
- char padding[12];
+ union {
+ struct {
+ char prefix[155];
+ char padding[12];
+ } posix;
+
+ struct {
+ char atime[12];
+ char ctime[12];
+ char offset[12];
+ char deprecated[4];
+ char unused;
+ struct {
+ char offset[12];
+ char numbytes[12];
+ } sparse[4];
+ char isextended;
+ char realsize[12];
+ char padding[17];
+ } gnu;
+ } tail;
} tar_header_t;
typedef struct {
@@ -48,6 +67,9 @@ typedef struct {
#define TAR_TYPE_DIR '5'
#define TAR_TYPE_FIFO '6'
+#define TAR_TYPE_GNU_SLINK 'K'
+#define TAR_TYPE_GNU_PATH 'L'
+
#define TAR_TYPE_PAX 'x'
#define TAR_MAGIC "ustar"