summaryrefslogtreecommitdiff
path: root/unpack/rdsquashfs.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-04 22:48:36 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-04 22:48:36 +0200
commit363de21c65fab165851fae1f8ef9665edb1ff508 (patch)
tree4b2a6df36c6b2944708f440e10b37253b00c2868 /unpack/rdsquashfs.h
parentabb31e7327e50cf2874ae9095eb147ed753862a3 (diff)
cleanup: rdsquashfs: store global data in structure
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack/rdsquashfs.h')
-rw-r--r--unpack/rdsquashfs.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/unpack/rdsquashfs.h b/unpack/rdsquashfs.h
index 995eee7..0961591 100644
--- a/unpack/rdsquashfs.h
+++ b/unpack/rdsquashfs.h
@@ -29,21 +29,26 @@ enum UNPACK_FLAGS {
UNPACK_CHOWN = 0x40,
};
+typedef struct {
+ compressor_t *cmp;
+ size_t block_size;
+ frag_reader_t *frag;
+ int sqfsfd;
+ int flags;
+} unsqfs_info_t;
+
tree_node_t *tree_node_from_inode(sqfs_inode_generic_t *inode,
const id_table_t *idtbl,
const char *name,
size_t block_size);
-int read_fstree(fstree_t *out, int fd, sqfs_super_t *super, compressor_t *cmp,
- int flags);
+int read_fstree(fstree_t *out, sqfs_super_t *super, unsqfs_info_t *info);
void list_files(tree_node_t *node);
-int extract_file(file_info_t *fi, compressor_t *cmp, size_t block_size,
- frag_reader_t *frag, int sqfsfd, int outfd);
+int extract_file(file_info_t *fi, unsqfs_info_t *info, int outfd);
-int restore_fstree(const char *rootdir, tree_node_t *root, compressor_t *cmp,
- size_t block_size, frag_reader_t *frag, int sqfsfd,
- int flags);
+int restore_fstree(const char *rootdir, tree_node_t *root,
+ unsqfs_info_t *info);
#endif /* RDSQUASHFS_H */