summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-07-25 05:37:54 +0300
committerTom Rini <trini@konsulko.com>2019-07-29 16:30:42 +0300
commit2090854cd2f228bab546f2718ccdbe1664830d3c (patch)
tree6b87d8e181377b3f9a0e6af8c0a14d5197ffe584 /test
parent75551c8bfc9545e31ec2ce238cac3857904007b8 (diff)
downloadu-boot-2090854cd2f228bab546f2718ccdbe1664830d3c.tar.xz
common: Move bootm_decomp_image() to image.c (as image_decomp())
Upcoming patches want to add decompression to use cases that are no longer directly related to booting. It makes sense to retain a single decompression routine, but it should no longer be in bootm.c (which is not compiled for all configurations). This patch moves bootm_decomp_image() to image.c and renames it to image_decomp() in preparation of those upcoming patches. Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> [trini: Fix warning around handle_decomp_error being unused] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'test')
-rw-r--r--test/compression.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/compression.c b/test/compression.c
index 7bc0f73e09..dc5e94684f 100644
--- a/test/compression.c
+++ b/test/compression.c
@@ -471,15 +471,15 @@ static int run_bootm_test(struct unit_test_state *uts, int comp_type,
unc_len = strlen(plain);
compress(uts, (void *)plain, unc_len, compress_buff, compress_size,
&compress_size);
- err = bootm_decomp_image(comp_type, load_addr, image_start,
- IH_TYPE_KERNEL, map_sysmem(load_addr, 0),
- compress_buff, compress_size, unc_len,
- &load_end);
+ err = image_decomp(comp_type, load_addr, image_start,
+ IH_TYPE_KERNEL, map_sysmem(load_addr, 0),
+ compress_buff, compress_size, unc_len,
+ &load_end);
ut_assertok(err);
- err = bootm_decomp_image(comp_type, load_addr, image_start,
- IH_TYPE_KERNEL, map_sysmem(load_addr, 0),
- compress_buff, compress_size, unc_len - 1,
- &load_end);
+ err = image_decomp(comp_type, load_addr, image_start,
+ IH_TYPE_KERNEL, map_sysmem(load_addr, 0),
+ compress_buff, compress_size, unc_len - 1,
+ &load_end);
ut_assert(err);
/* We can't detect corruption when not decompressing */
@@ -487,10 +487,10 @@ static int run_bootm_test(struct unit_test_state *uts, int comp_type,
return 0;
memset(compress_buff + compress_size / 2, '\x49',
compress_size / 2);
- err = bootm_decomp_image(comp_type, load_addr, image_start,
- IH_TYPE_KERNEL, map_sysmem(load_addr, 0),
- compress_buff, compress_size, 0x10000,
- &load_end);
+ err = image_decomp(comp_type, load_addr, image_start,
+ IH_TYPE_KERNEL, map_sysmem(load_addr, 0),
+ compress_buff, compress_size, 0x10000,
+ &load_end);
ut_assert(err);
return 0;