diff options
author | Simon Glass | 2021-11-19 13:23:52 -0700 |
---|---|---|
committer | Anatolij Gustschin | 2021-12-26 23:02:19 +0100 |
commit | 6cdc8be7c5f2a79db8f0791a76c83d46c9aa7591 (patch) | |
tree | 9e860c02d4a22052c4a575bedf95d51306e4a997 /cmd | |
parent | 6a19e938f8ea086ae2da8e7bc304522c80e895d3 (diff) |
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 <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/unzip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/unzip.c b/cmd/unzip.c index 3d1f5f3ac10..bc6cee06043 100644 --- a/cmd/unzip.c +++ b/cmd/unzip.c @@ -8,6 +8,7 @@ #include <command.h> #include <env.h> #include <gzip.h> +#include <mapmem.h> #include <part.h> 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); |