Skip to content

Commit 6cdc8be

Browse files
sjg20vdsao
authored andcommitted
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 <[email protected]>
1 parent 6a19e93 commit 6cdc8be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/unzip.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <command.h>
99
#include <env.h>
1010
#include <gzip.h>
11+
#include <mapmem.h>
1112
#include <part.h>
1213

1314
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,
2829
return CMD_RET_USAGE;
2930
}
3031

31-
if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0)
32+
if (gunzip(map_sysmem(dst, dst_len), dst_len, map_sysmem(src, 0),
33+
&src_len) != 0)
3234
return 1;
3335

3436
printf("Uncompressed size: %lu = 0x%lX\n", src_len, src_len);

0 commit comments

Comments
 (0)