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 --- lib/common/Makemodule.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/common/Makemodule.am') diff --git a/lib/common/Makemodule.am b/lib/common/Makemodule.am index e0cc551..a50ddcb 100644 --- a/lib/common/Makemodule.am +++ b/lib/common/Makemodule.am @@ -1,8 +1,7 @@ libcommon_a_SOURCES = include/common.h include/simple_writer.h \ include/compress_cli.h \ lib/common/src/hardlink.c lib/common/src/print_version.c \ - lib/common/src/compress.c \ - lib/common/src/comp_opt.c lib/common/src/data_writer.c \ + lib/common/src/compress.c lib/common/src/comp_opt.c \ lib/common/src/parse_size.c lib/common/src/print_size.c \ lib/common/src/writer/init.c lib/common/src/writer/cleanup.c \ lib/common/src/writer/serialize_fstree.c lib/common/src/writer/finish.c\ -- cgit v1.2.3