From f757737060d4daebb24a32e90d912661428708a8 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 13 Sep 2020 13:37:42 +0200 Subject: Remodel libtar/tar2sqfs to read data from an istream_t Signed-off-by: David Oberhollenzer --- include/tar.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'include/tar.h') diff --git a/include/tar.h b/include/tar.h index 38ec656..10e7b52 100644 --- a/include/tar.h +++ b/include/tar.h @@ -131,12 +131,12 @@ int write_hard_link(ostream_t *fp, const struct stat *sb, const char *name, const char *target, unsigned int counter); /* calcuate and skip the zero padding */ -int skip_padding(FILE *fp, sqfs_u64 size); +int skip_padding(istream_t *fp, sqfs_u64 size); /* round up to block size and skip the entire entry */ -int skip_entry(FILE *fp, sqfs_u64 size); +int skip_entry(istream_t *fp, sqfs_u64 size); -int read_header(FILE *fp, tar_header_decoded_t *out); +int read_header(istream_t *fp, tar_header_decoded_t *out); void free_xattr_list(tar_xattr_t *list); @@ -148,13 +148,4 @@ void clear_header(tar_header_decoded_t *hdr); */ int padd_file(ostream_t *fp, sqfs_u64 size); - -/* - A wrapper around the read() system call. It retries the read if it is - interrupted by a signal or less than the desired size was read. Returns 0 - on success. Writes to stderr on failure using 'errstr' as a perror style - error prefix. -*/ -int read_retry(const char *errstr, FILE *fp, void *buffer, size_t size); - #endif /* TAR_H */ -- cgit v1.2.3