From 6351872732fce77186f401050eee92c7c3aa3461 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 20 May 2023 17:04:15 +0200 Subject: libtar: add a dir_iterator_t implementation for tar files The existing istream_t wrapper is mered into this one as well, we can open the files via the iterators open_file_ro function. Unit tests and tar2sqfs are modified accordingly. Signed-off-by: David Oberhollenzer --- include/tar/tar.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include/tar') diff --git a/include/tar/tar.h b/include/tar/tar.h index 21ded7d..f77b27c 100644 --- a/include/tar/tar.h +++ b/include/tar/tar.h @@ -59,14 +59,11 @@ int write_hard_link(ostream_t *fp, const struct stat *sb, const char *name, const char *target, unsigned int counter); /* round up to block size and skip the entire entry */ -int skip_entry(istream_t *fp, sqfs_u64 size); - int read_header(istream_t *fp, tar_header_decoded_t *out); void clear_header(tar_header_decoded_t *hdr); -istream_t *tar_record_istream_create(istream_t *parent, - const tar_header_decoded_t *hdr); +dir_iterator_t *tar_open_stream(istream_t *stream); /* Write zero bytes to an output file to padd it to the tar record size. -- cgit v1.2.3