]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - cmd/cramfs.c
omap3_logic: Fix Environmental location
[people/ms/u-boot.git] / cmd / cramfs.c
index 49ee36c74aec81cbdb512d0e46526ba7cce380e0..86f1bac272cce1a1e1033ca141f1bc86f349413c 100644 (file)
@@ -104,7 +104,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        struct mtdids id;
 
        ulong addr;
-       addr = simple_strtoul(getenv("cramfsaddr"), NULL, 16);
+       addr = simple_strtoul(env_get("cramfsaddr"), NULL, 16);
 
        /* hack! */
        /* cramfs_* only supports NOR flash chips */
@@ -117,9 +117,9 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        part.offset = (u64)(uintptr_t) map_sysmem(addr - OFFSET_ADJUSTMENT, 0);
 
        /* pre-set Boot file name */
-       if ((filename = getenv("bootfile")) == NULL) {
+       filename = env_get("bootfile");
+       if (!filename)
                filename = "uImage";
-       }
 
        if (argc == 2) {
                filename = argv[1];
@@ -138,7 +138,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        if (size > 0) {
                printf("### CRAMFS load complete: %d bytes loaded to 0x%lx\n",
                        size, offset);
-               setenv_hex("filesize", size);
+               env_set_hex("filesize", size);
        } else {
                printf("### CRAMFS LOAD ERROR<%x> for %s!\n", size, filename);
        }
@@ -169,7 +169,7 @@ int do_cramfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        struct mtdids id;
 
        ulong addr;
-       addr = simple_strtoul(getenv("cramfsaddr"), NULL, 16);
+       addr = simple_strtoul(env_get("cramfsaddr"), NULL, 16);
 
        /* hack! */
        /* cramfs_* only supports NOR flash chips */