From 154532d71c447e73c70ec06d26628bb6919b9a5a Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 27 Jun 2019 14:21:54 +0200 Subject: Relax tar header parser to accept pre-posix formats Signed-off-by: David Oberhollenzer --- include/tar.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/tar.h') diff --git a/include/tar.h b/include/tar.h index a39d7c9..3b7c8eb 100644 --- a/include/tar.h +++ b/include/tar.h @@ -6,6 +6,13 @@ #include #include +typedef enum { + ETV_UNKNOWN = 0, + ETV_V7_UNIX, + ETV_PRE_POSIX, + ETV_POSIX, +} E_TAR_VERSION; + typedef struct { char name[100]; char mode[8]; @@ -46,6 +53,9 @@ typedef struct { #define TAR_MAGIC "ustar" #define TAR_VERSION "00" +#define TAR_MAGIC_OLD "ustar " +#define TAR_VERSION_OLD " " + /* Returns < 0 on failure, > 0 if cannot encode, 0 on success. Prints error/warning messages to stderr. -- cgit v1.2.3