From: Piotr Dymacz Date: Fri, 16 Jun 2017 13:07:28 +0000 (+0200) Subject: Always prepend file{addr,size} env variables values with 0x X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7d1b28c50e671ef4b9bc0de694f1f50f4ba6d84d;p=oweals%2Fu-boot_mod.git Always prepend file{addr,size} env variables values with 0x --- diff --git a/u-boot/common/cmd_load.c b/u-boot/common/cmd_load.c index 71d3dd6..b8be6ee 100644 --- a/u-boot/common/cmd_load.c +++ b/u-boot/common/cmd_load.c @@ -206,7 +206,7 @@ static ulong load_serial(ulong offset) flush_cache(start_addr, size); - sprintf(buf, "%lX", size); + sprintf(buf, "0x%lX", size); setenv("filesize", buf); return addr; @@ -516,7 +516,7 @@ int do_load_serial_bin(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) flush_cache(address, size_dl); - sprintf(buf, "%X", size_dl); + sprintf(buf, "0x%X", size_dl); setenv("filesize", buf); } else { puts("\n"); diff --git a/u-boot/net/net.c b/u-boot/net/net.c index 0ab249d..d35c765 100644 --- a/u-boot/net/net.c +++ b/u-boot/net/net.c @@ -515,10 +515,10 @@ int NetLoop(proto_t protocol){ char buf[10]; printf("\nBytes transferred: %ld (0x%lx)\n", NetBootFileXferSize, NetBootFileXferSize); - sprintf(buf, "%lx", NetBootFileXferSize); + sprintf(buf, "0x%lX", NetBootFileXferSize); setenv("filesize", buf); - sprintf(buf, "%lX", (unsigned long)load_addr); + sprintf(buf, "0x%lX", (unsigned long)load_addr); setenv("fileaddr", buf); }