From d5068781ec2528f88aaa92fbc9a5b9c256d53499 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 6 May 2019 12:09:56 +0200 Subject: Implement reading and writing of compressor options - gensquashfs simply asks the backend compressor to write its options to the file and does accounting - rdsquasfs simply asks the backend compressor to transparentyl snort the options from the file - not implemented in any compressor backend yet Signed-off-by: David Oberhollenzer --- unpack/rdsquashfs.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'unpack') diff --git a/unpack/rdsquashfs.c b/unpack/rdsquashfs.c index a24434c..8ee3dbd 100644 --- a/unpack/rdsquashfs.c +++ b/unpack/rdsquashfs.c @@ -260,13 +260,6 @@ int main(int argc, char **argv) goto out_fd; } - if (super.flags & SQFS_FLAG_COMPRESSOR_OPTIONS) { - fputs("Image has been built with compressor options.\n" - "This is not yet supported.\n", - stderr); - goto out_fd; - } - if (!compressor_exists(super.compression_id)) { fputs("Image uses a compressor that has not been built in\n", stderr); @@ -278,6 +271,11 @@ int main(int argc, char **argv) if (info.cmp == NULL) goto out_fd; + if (super.flags & SQFS_FLAG_COMPRESSOR_OPTIONS) { + if (info.cmp->read_options(info.cmp, info.sqfsfd)) + goto out_cmp; + } + if (read_fstree(&fs, &super, &info)) goto out_cmp; -- cgit v1.2.3