summaryrefslogtreecommitdiff
path: root/include/tar.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-09-13 13:37:42 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-09-16 09:34:35 +0200
commitf757737060d4daebb24a32e90d912661428708a8 (patch)
treea6e96145d4fc540e435c13a69c924329db2edb6d /include/tar.h
parentc1a2cb729bd5bb5fdadf00cb3968bbc541f79750 (diff)
Remodel libtar/tar2sqfs to read data from an istream_t
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/tar.h')
-rw-r--r--include/tar.h15
1 files changed, 3 insertions, 12 deletions
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 */