X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_unzip.c;h=b02c69e586283672ba0c4bf38f2202099d0fe477;hb=c4474fc88047ac91292930ae906585934df59015;hp=6483b9267b63b1d2367e7e679ad7419f8525e9a9;hpb=aef293bc85dad4f8d645e46d723606a747236a60;p=u-boot diff --git a/common/cmd_unzip.c b/common/cmd_unzip.c index 6483b9267b..b02c69e586 100644 --- a/common/cmd_unzip.c +++ b/common/cmd_unzip.c @@ -2,23 +2,7 @@ * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -28,7 +12,6 @@ static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long src, dst; unsigned long src_len = ~0UL, dst_len = ~0UL; - char buf[32]; switch (argc) { case 4: @@ -39,15 +22,14 @@ static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) dst = simple_strtoul(argv[2], NULL, 16); break; default: - return cmd_usage(cmdtp); + return CMD_RET_USAGE; } if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0) return 1; printf("Uncompressed size: %ld = 0x%lX\n", src_len, src_len); - sprintf(buf, "%lX", src_len); - setenv("filesize", buf); + setenv_hex("filesize", src_len); return 0; }