summaryrefslogtreecommitdiff
path: root/lib/tar
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-25 17:47:19 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-25 17:47:19 +0200
commit3511b1fa7c6f71c579e161951e945904e552e1d9 (patch)
tree55fa94e5daef7bcc8e4b650f27d05af49fd1b02d /lib/tar
parent4d79f55f4a626a3cfd8bd18673aa29b48b16e137 (diff)
Remove condensed sparse file handling from libsquashfs
This only exists for tar2sqfs. Move the sparse file map to libtar and add the ability to do this into the stind sqfs_file_t abstraction, so it acts like a normal file but internally stitches the data together from the sparse implementation. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/tar')
-rw-r--r--lib/tar/cleanup.c4
-rw-r--r--lib/tar/internal.h6
-rw-r--r--lib/tar/read_header.c2
-rw-r--r--lib/tar/read_sparse_map.c4
-rw-r--r--lib/tar/read_sparse_map_old.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/lib/tar/cleanup.c b/lib/tar/cleanup.c
index 3c1d0e9..2f814bf 100644
--- a/lib/tar/cleanup.c
+++ b/lib/tar/cleanup.c
@@ -8,9 +8,9 @@
#include "internal.h"
-void free_sparse_list(sqfs_sparse_map_t *sparse)
+void free_sparse_list(sparse_map_t *sparse)
{
- sqfs_sparse_map_t *old;
+ sparse_map_t *old;
while (sparse != NULL) {
old = sparse;
diff --git a/lib/tar/internal.h b/lib/tar/internal.h
index bc9a3a8..d95ef52 100644
--- a/lib/tar/internal.h
+++ b/lib/tar/internal.h
@@ -55,11 +55,11 @@ void update_checksum(tar_header_t *hdr);
bool is_checksum_valid(const tar_header_t *hdr);
-sqfs_sparse_map_t *read_sparse_map(const char *line);
+sparse_map_t *read_sparse_map(const char *line);
-sqfs_sparse_map_t *read_gnu_old_sparse(int fd, tar_header_t *hdr);
+sparse_map_t *read_gnu_old_sparse(int fd, tar_header_t *hdr);
-void free_sparse_list(sqfs_sparse_map_t *sparse);
+void free_sparse_list(sparse_map_t *sparse);
void free_xattr_list(tar_xattr_t *list);
diff --git a/lib/tar/read_header.c b/lib/tar/read_header.c
index a874972..63de699 100644
--- a/lib/tar/read_header.c
+++ b/lib/tar/read_header.c
@@ -77,7 +77,7 @@ static tar_xattr_t *mkxattr(const char *key, size_t keylen,
static int read_pax_header(int fd, uint64_t entsize, unsigned int *set_by_pax,
tar_header_decoded_t *out)
{
- sqfs_sparse_map_t *sparse_last = NULL, *sparse;
+ sparse_map_t *sparse_last = NULL, *sparse;
uint64_t field, offset = 0, num_bytes = 0;
char *buffer, *line, *key, *ptr, *value;
tar_xattr_t *xattr;
diff --git a/lib/tar/read_sparse_map.c b/lib/tar/read_sparse_map.c
index 981a808..0779b96 100644
--- a/lib/tar/read_sparse_map.c
+++ b/lib/tar/read_sparse_map.c
@@ -8,9 +8,9 @@
#include "internal.h"
-sqfs_sparse_map_t *read_sparse_map(const char *line)
+sparse_map_t *read_sparse_map(const char *line)
{
- sqfs_sparse_map_t *last = NULL, *list = NULL, *ent = NULL;
+ sparse_map_t *last = NULL, *list = NULL, *ent = NULL;
do {
ent = calloc(1, sizeof(*ent));
diff --git a/lib/tar/read_sparse_map_old.c b/lib/tar/read_sparse_map_old.c
index 7fb4cb3..5891bdb 100644
--- a/lib/tar/read_sparse_map_old.c
+++ b/lib/tar/read_sparse_map_old.c
@@ -8,9 +8,9 @@
#include "internal.h"
-sqfs_sparse_map_t *read_gnu_old_sparse(int fd, tar_header_t *hdr)
+sparse_map_t *read_gnu_old_sparse(int fd, tar_header_t *hdr)
{
- sqfs_sparse_map_t *list = NULL, *end = NULL, *node;
+ sparse_map_t *list = NULL, *end = NULL, *node;
gnu_sparse_t sph;
uint64_t off, sz;
int i;