cmd: eeprom: Staticize eeprom_i2c_bus
[oweals/u-boot.git] / cmd / lzmadec.c
index 1ad9ed6ce96a5c37f32b2eb2f702cfc1787232bb..e3b9cc75ac2b9a90a383baa1e7e3b3b4f87ea2d8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2013 Patrice Bouchand <pbfwdlist_gmail_com>
  * lzma uncompress command in Uboot
@@ -6,12 +7,11 @@
  *
  * (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 <mapmem.h>
 #include <asm/io.h>
 
@@ -20,7 +20,7 @@
 static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
        unsigned long src, dst;
-       unsigned long src_len = ~0UL, dst_len = ~0UL;
+       SizeT src_len = ~0UL, dst_len = ~0UL;
        int ret;
 
        switch (argc) {
@@ -40,8 +40,9 @@ static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 
        if (ret != SZ_OK)
                return 1;
-       printf("Uncompressed size: %ld = 0x%lX\n", src_len, src_len);
-       setenv_hex("filesize", src_len);
+       printf("Uncompressed size: %ld = %#lX\n", (ulong)src_len,
+              (ulong)src_len);
+       env_set_hex("filesize", src_len);
 
        return 0;
 }