From: Marek Vasut Date: Thu, 2 Mar 2023 03:04:40 +0000 (+0100) Subject: cmd: fdt: Drop the 0x prefix X-Git-Tag: v2023.07~72^2~32^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed4dcb1f9b12e84721f70cc0a9bf838059581967;p=platform%2Fkernel%2Fu-boot.git cmd: fdt: Drop the 0x prefix The 'fdt get addr' is always assumed to be hex value, drop the prefix. Since this might break existing users who depend on the existing behavior with 0x prefix, this is a separate patch. Revert if this breaks anything. Signed-off-by: Marek Vasut --- diff --git a/cmd/fdt.c b/cmd/fdt.c index f38fe90..04b664e 100644 --- a/cmd/fdt.c +++ b/cmd/fdt.c @@ -478,7 +478,7 @@ static int do_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) /* Get address */ char buf[19]; - snprintf(buf, sizeof(buf), "0x%lx", + snprintf(buf, sizeof(buf), "%lx", (ulong)map_to_sysmem(nodep)); env_set(var, buf); } else if (subcmd[0] == 's') {