The 'fdt get addr' and 'env get size' is always assumed to be hex
value, drop the prefix, and outright switch to env_set_hex(). 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 <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
if (ret != 0)
return ret;
} else if (subcmd[0] == 'a') {
- /* Get address */
- char buf[19];
-
- snprintf(buf, sizeof(buf), "%lx",
- (ulong)map_to_sysmem(nodep));
- env_set(var, buf);
+ env_set_hex(var, (ulong)map_to_sysmem(nodep));
} else if (subcmd[0] == 's') {
- /* Get size */
- char buf[11];
-
- sprintf(buf, "0x%08X", len);
- env_set(var, buf);
+ env_set_hex(var, len);
} else
return CMD_RET_USAGE;
return 0;