aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-09-18 23:25:32 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-09-19 13:25:32 +0200
commit6a5d2dc7795029acf38862ecaefebc4015400045 (patch)
tree2173162d1eb84012c47e9048bdb74b94cc2b8063 /include
parentbfd932fb3470fa7250359da6ed5641182a10077c (diff)
libtar: accept an sqfs_dir_entry_t instead of a struct stat
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/compat.h16
-rw-r--r--include/tar/tar.h8
2 files changed, 2 insertions, 22 deletions
diff --git a/include/compat.h b/include/compat.h
index e62df81..8491cf0 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -142,22 +142,6 @@ static inline int _sz_mul_overflow(size_t a, size_t b, size_t *res)
#define S_IWOTH SQFS_INODE_OTHERS_W
#define S_IXOTH SQFS_INODE_OTHERS_X
-struct stat {
- sqfs_u32 st_dev;
- sqfs_u32 st_ino;
- sqfs_u16 st_mode;
- sqfs_u16 st_nlink;
- sqfs_u32 st_uid;
- sqfs_u32 st_gid;
- sqfs_u32 st_rdev;
- sqfs_u64 st_size;
- sqfs_u32 st_blksize;
- sqfs_u32 st_blocks;
- sqfs_u64 st_atime;
- sqfs_u64 st_mtime;
- sqfs_u64 st_ctime;
-};
-
/* lifted from musl libc */
#define major(x) \
((unsigned)( (((x)>>31>>1) & 0xfffff000) | (((x)>>8) & 0x00000fff) ))
diff --git a/include/tar/tar.h b/include/tar/tar.h
index 68fde98..84cffb5 100644
--- a/include/tar/tar.h
+++ b/include/tar/tar.h
@@ -55,14 +55,10 @@ extern "C" {
The counter is an incremental record counter used if additional
headers need to be generated.
*/
-int write_tar_header(sqfs_ostream_t *fp,
- const struct stat *sb, const char *name,
- const char *slink_target, const sqfs_xattr_t *xattr,
+int write_tar_header(sqfs_ostream_t *fp, const sqfs_dir_entry_t *ent,
+ const char *link_target, const sqfs_xattr_t *xattr,
unsigned int counter);
-int write_hard_link(sqfs_ostream_t *fp, const struct stat *sb, const char *name,
- const char *target, unsigned int counter);
-
/* round up to block size and skip the entire entry */
int read_header(sqfs_istream_t *fp, tar_header_decoded_t *out);