| // SPDX-License-Identifier: GPL-2.0+ |
| * Lei Wen <leiwen@marvell.com>, Marvell Inc. |
| static int do_zip(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
| unsigned long src_len, dst_len = ~0UL; |
| dst_len = hextoul(argv[4], NULL); |
| src = hextoul(argv[1], NULL); |
| src_len = hextoul(argv[2], NULL); |
| dst = hextoul(argv[3], NULL); |
| if (gzip((void *) dst, &dst_len, (void *) src, src_len) != 0) |
| printf("Compressed size: %lu = 0x%lX\n", dst_len, dst_len); |
| env_set_hex("filesize", dst_len); |
| "srcaddr srcsize dstaddr [dstsize]" |