Merge branch '2020-05-15-kconfig-migrations'
[oweals/u-boot.git] / cmd / unzip.c
index a8bcb1f529d2e60df610d44d9c3a6dbc498ce3f0..afd58e7cdb12757c3cf333919e2087d711213ecd 100644 (file)
@@ -1,12 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
+#include <gzip.h>
 
 static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
@@ -28,8 +29,8 @@ static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0)
                return 1;
 
-       printf("Uncompressed size: %ld = 0x%lX\n", src_len, src_len);
-       setenv_hex("filesize", src_len);
+       printf("Uncompressed size: %lu = 0x%lX\n", src_len, src_len);
+       env_set_hex("filesize", src_len);
 
        return 0;
 }