summaryrefslogtreecommitdiff
path: root/unpack/rdsquashfs.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-06 12:09:56 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-06 12:15:44 +0200
commitd5068781ec2528f88aaa92fbc9a5b9c256d53499 (patch)
tree8eac6ec1a02f12e71ec97b1cf66113f37df6d508 /unpack/rdsquashfs.c
parentcbcf86dde27767682483985e42f7ca49e1d3a208 (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack/rdsquashfs.c')
-rw-r--r--unpack/rdsquashfs.c12
1 files changed, 5 insertions, 7 deletions
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;