diff options
author | Simon Glass <sjg@chromium.org> | 2013-02-24 17:33:22 +0000 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2013-02-28 19:09:23 -0800 |
commit | 41ef372c1a2d344621c74aa4bce5cdb0970ba5f1 (patch) | |
tree | 9abdeda0b3b87a70e4f3929e83ddd15f4704377f /common/cmd_bootm.c | |
parent | bfc59966431e6335fd5be0589eec073902cc7bb3 (diff) | |
download | u-boot-imx-41ef372c1a2d344621c74aa4bce5cdb0970ba5f1.zip u-boot-imx-41ef372c1a2d344621c74aa4bce5cdb0970ba5f1.tar.gz u-boot-imx-41ef372c1a2d344621c74aa4bce5cdb0970ba5f1.tar.bz2 |
common: Use new numeric setenv functions
Use setenv_ulong(), setenv_hex() and setenv_addr() in common/
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r-- | common/cmd_bootm.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 1312a0d..b32991d 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -452,9 +452,7 @@ static int bootm_start_standalone(ulong iflag, int argc, char * const argv[]) /* Don't start if "autostart" is set to "no" */ if (((s = getenv("autostart")) != NULL) && (strcmp(s, "no") == 0)) { - char buf[32]; - sprintf(buf, "%lX", images.os.image_len); - setenv("filesize", buf); + setenv_hex("filesize", images.os.image_len); return 0; } appl = (int (*)(int, char * const []))(ulong)ntohl(images.ep); @@ -529,17 +527,14 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc, case BOOTM_STATE_RAMDISK: { ulong rd_len = images.rd_end - images.rd_start; - char str[17]; ret = boot_ramdisk_high(&images.lmb, images.rd_start, rd_len, &images.initrd_start, &images.initrd_end); if (ret) return ret; - sprintf(str, "%lx", images.initrd_start); - setenv("initrd_start", str); - sprintf(str, "%lx", images.initrd_end); - setenv("initrd_end", str); + setenv_hex("initrd_start", images.initrd_start); + setenv_hex("initrd_end", images.initrd_end); } break; #endif |