aboutsummaryrefslogtreecommitdiff
path: root/include/tar.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tar.h')
-rw-r--r--include/tar.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/tar.h b/include/tar.h
index d0a483c..e86d775 100644
--- a/include/tar.h
+++ b/include/tar.h
@@ -109,6 +109,8 @@ typedef struct {
#define TAR_MAGIC_OLD "ustar "
#define TAR_VERSION_OLD " "
+#define TAR_RECORD_SIZE (512)
+
/*
Returns < 0 on failure, > 0 if cannot encode, 0 on success.
Prints error/warning messages to stderr.
@@ -130,4 +132,10 @@ int read_header(int fd, tar_header_decoded_t *out);
void clear_header(tar_header_decoded_t *hdr);
+/*
+ Write zero bytes to an output file to padd it to the tar record size.
+ Returns 0 on success. On failure, prints error message to stderr.
+*/
+int padd_file(int outfd, sqfs_u64 size);
+
#endif /* TAR_H */