summaryrefslogtreecommitdiff
path: root/lib/sqfs/comp/lz4.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-06-04 07:24:52 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-06-04 07:24:52 +0200
commitb6d0bcbf1fa9c8088578c959f442e219f590ebf9 (patch)
tree2aaffddd7c46e1850b651796797c8df18622b14e /lib/sqfs/comp/lz4.c
parent30597cc7c5d566f671c84c025de97cb1fc2d242e (diff)
Cleanup: Pull compression level parameter out into compressor config
Every compressor (except LC4) has a compression level parameter. This commit pulls the compression level field out into the generic configuration structure and applies some code clean ups as a result from this. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/comp/lz4.c')
-rw-r--r--lib/sqfs/comp/lz4.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqfs/comp/lz4.c b/lib/sqfs/comp/lz4.c
index 090ec50..f326870 100644
--- a/lib/sqfs/comp/lz4.c
+++ b/lib/sqfs/comp/lz4.c
@@ -148,6 +148,9 @@ int lz4_compressor_create(const sqfs_compressor_config_t *cfg,
return SQFS_ERROR_UNSUPPORTED;
}
+ if (cfg->level != 0)
+ return SQFS_ERROR_UNSUPPORTED;
+
lz4 = calloc(1, sizeof(*lz4));
base = (sqfs_compressor_t *)lz4;
if (lz4 == NULL)