diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-06-30 16:41:21 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-06-30 16:41:21 +0200 |
commit | f439b20706ade4b5630c3d6c57e6a36ce0dc287a (patch) | |
tree | 210abf39ac29d7cf7513f667f63495ef1fd43700 /lib/tar | |
parent | 3e920038ecd8cc123b0c8dd957f94a8e1a616c0c (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 'lib/tar')
-rw-r--r-- | lib/tar/read_header.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tar/read_header.c b/lib/tar/read_header.c index 5d2a808..74666b3 100644 --- a/lib/tar/read_header.c +++ b/lib/tar/read_header.c @@ -451,9 +451,9 @@ fail: return NULL; } -static void free_sparse_list(tar_sparse_data_t *sparse) +static void free_sparse_list(sparse_map_t *sparse) { - tar_sparse_data_t *old; + sparse_map_t *old; while (sparse != NULL) { old = sparse; @@ -462,9 +462,9 @@ static void free_sparse_list(tar_sparse_data_t *sparse) } } -static tar_sparse_data_t *read_gnu_old_sparse(int fd, tar_header_t *hdr) +static sparse_map_t *read_gnu_old_sparse(int fd, tar_header_t *hdr) { - tar_sparse_data_t *list = NULL, *end = NULL, *node; + sparse_map_t *list = NULL, *end = NULL, *node; gnu_sparse_t sph; uint64_t off, sz; ssize_t ret; |