aboutsummaryrefslogtreecommitdiff
path: root/tar/tar.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-16 12:36:37 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-16 12:36:37 +0200
commitad83b0f167f3e65a2aa04cf358d1f995f1241a3c (patch)
tree6e2b21dc608b41c6adcebe8f23b3b78017025bd1 /tar/tar.h
parent69742b622a228babad255cbd64330d04c39c7e81 (diff)
sqfs2tar: cleanup tar header generation
- use struct stat instead of tree node - compact some of the code Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar/tar.h')
-rw-r--r--tar/tar.h7
1 files changed, 4 insertions, 3 deletions
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 <sys/stat.h>
+#include <stdbool.h>
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);