From 7d1b28c50e671ef4b9bc0de694f1f50f4ba6d84d Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Fri, 16 Jun 2017 15:07:28 +0200 Subject: [PATCH] Always prepend file{addr,size} env variables values with 0x --- u-boot/common/cmd_load.c | 4 ++-- u-boot/net/net.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); } -- 2.25.1