aboutsummaryrefslogtreecommitdiff
path: root/include/tar.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-30 16:41:21 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-30 16:41:21 +0200
commitf439b20706ade4b5630c3d6c57e6a36ce0dc287a (patch)
tree210abf39ac29d7cf7513f667f63495ef1fd43700 /include/tar.h
parent3e920038ecd8cc123b0c8dd957f94a8e1a616c0c (diff)
Add support for repacking condensed sparse files
This commit broadly does the following things: - Rename and move the sparse mapping structure to libutil - Add a function to the data writer for writing condensed versions of sparse files, given the mapping. - This shares code with the already existing function for regular files. The shared code is moved to a common helper function. - Add support to tar2sqfs for repacking sparse files. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/tar.h')
-rw-r--r--include/tar.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/tar.h b/include/tar.h
index 2819740..1f8ca7e 100644
--- a/include/tar.h
+++ b/include/tar.h
@@ -6,6 +6,8 @@
#include <stdbool.h>
#include <stdint.h>
+#include "util.h"
+
typedef enum {
ETV_UNKNOWN = 0,
ETV_V7_UNIX,
@@ -61,17 +63,11 @@ typedef struct {
char padding[7];
} gnu_sparse_t;
-typedef struct tar_sparse_data_t {
- struct tar_sparse_data_t *next;
- uint64_t offset;
- uint64_t count;
-} tar_sparse_data_t;
-
typedef struct {
struct stat sb;
char *name;
char *link_target;
- tar_sparse_data_t *sparse;
+ sparse_map_t *sparse;
uint64_t sparse_size;
bool unknown_record;
} tar_header_decoded_t;