From b9b3b7663dffb83e112b5a4aaf786fcab23182fa Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 21 May 2020 21:18:35 +0200 Subject: Fix: zstd: actually set the compression level from the options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the zstd compressor, the compression level from the configuration structure wasn't used at all. Instead, the zstd compressor was told to use level 0 and compressor options with that parameter were written to disk. This commit makes sure the level parameter is propperly initialized. Reported-by: Sébastien Gross Signed-off-by: David Oberhollenzer --- lib/sqfs/comp/zstd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/sqfs') diff --git a/lib/sqfs/comp/zstd.c b/lib/sqfs/comp/zstd.c index 986c669..18289fe 100644 --- a/lib/sqfs/comp/zstd.c +++ b/lib/sqfs/comp/zstd.c @@ -154,6 +154,7 @@ int zstd_compressor_create(const sqfs_compressor_config_t *cfg, return SQFS_ERROR_ALLOC; zstd->block_size = cfg->block_size; + zstd->level = cfg->opt.zstd.level; zstd->zctx = ZSTD_createCCtx(); if (zstd->zctx == NULL) { free(zstd); -- cgit v1.2.3