From: Simon Glass Date: Fri, 19 Nov 2021 20:23:52 +0000 (-0700) Subject: sandbox: Enable support for the gzip command X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=6cdc8be7c5f2a79db8f0791a76c83d46c9aa7591;p=u-boot.git sandbox: Enable support for the gzip command This does not work with sandbox at present. Fix it up to use map_sysmem() to convert an address to a pointer. Signed-off-by: Simon Glass --- diff --git a/cmd/unzip.c b/cmd/unzip.c index 3d1f5f3ac1..bc6cee0604 100644 --- a/cmd/unzip.c +++ b/cmd/unzip.c @@ -8,6 +8,7 @@ #include #include #include +#include #include static int do_unzip(struct cmd_tbl *cmdtp, int flag, int argc, @@ -28,7 +29,8 @@ static int do_unzip(struct cmd_tbl *cmdtp, int flag, int argc, return CMD_RET_USAGE; } - if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0) + if (gunzip(map_sysmem(dst, dst_len), dst_len, map_sysmem(src, 0), + &src_len) != 0) return 1; printf("Uncompressed size: %lu = 0x%lX\n", src_len, src_len);