From ad83b0f167f3e65a2aa04cf358d1f995f1241a3c Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 16 Jun 2019 12:36:37 +0200 Subject: sqfs2tar: cleanup tar header generation - use struct stat instead of tree node - compact some of the code Signed-off-by: David Oberhollenzer --- tar/tar.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tar/tar.h') diff --git a/tar/tar.h b/tar/tar.h index 11af6ee..35c4fe0 100644 --- a/tar/tar.h +++ b/tar/tar.h @@ -2,7 +2,8 @@ #ifndef TAR_H #define TAR_H -#include "fstree.h" +#include +#include typedef struct { char name[100]; @@ -53,8 +54,8 @@ typedef struct { Returns < 0 on failure, > 0 if cannot encode, 0 on success. Prints error/warning messages to stderr. */ -int write_tar_header(int fd, const fstree_t *fs, const tree_node_t *n, - const char *name); +int write_tar_header(int fd, const struct stat *sb, const char *name, + const char *slink_target); /* calcuate and skip the zero padding */ int skip_padding(int fd, uint64_t size); -- cgit v1.2.3