From 8b5a2d64fa95cb964540b950ca237545d9e51822 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 9 Sep 2023 00:06:08 +0200 Subject: libcommon: get rid of write_data_from_file Modify gensquashfs to pack data using an istream wrapper, similar to tar2sqfs. To implement the no-tail-pack option, we need the file size, so we simply open a raw handle first, and query it (using libsquashfs API) and then create the stream wrapper. For the output side, we create a block-processor ostream wrapper and splice it. Since gensquashfs is the only, remaining user of the pack-a-file functon, we can then remove it from libcommon. Signed-off-by: David Oberhollenzer --- include/common.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/common.h b/include/common.h index 707d46b..bf3f34c 100644 --- a/include/common.h +++ b/include/common.h @@ -33,10 +33,6 @@ typedef struct sqfs_hard_link_t { char *target; } sqfs_hard_link_t; -int write_data_from_file(const char *filename, sqfs_block_processor_t *data, - sqfs_inode_generic_t **inode, - sqfs_file_t *file, int flags); - void sqfs_perror(const char *file, const char *action, int error_code); int sqfs_tree_find_hard_links(const sqfs_tree_node_t *root, -- cgit v1.2.3