[PATCH 08/23] sandbox: Enable support for the gzip command
Simon Glass
sjg at chromium.org
Fri Nov 19 21:23:52 CET 2021
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 at chromium.org>
---
cmd/unzip.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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);
--
2.34.0.rc2.393.gf8c9666880-goog
More information about the U-Boot
mailing list