X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fenv_flash.c;h=50ca4ffa5687736ad8e99ca36fb9d8d960e681d7;hb=711a6722f97d21404d04c7a36ccfdc6e2b442229;hp=54c0bfec7624192276886dbfa0c886fc13052a02;hpb=90d8cff09918f1fdf15cdb4e6c55fb1712340710;p=u-boot diff --git a/common/env_flash.c b/common/env_flash.c index 54c0bfec76..50ca4ffa56 100644 --- a/common/env_flash.c +++ b/common/env_flash.c @@ -74,7 +74,7 @@ static env_t *flash_addr_new = (env_t *)CONFIG_ENV_ADDR_REDUND; static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1; #endif /* CONFIG_ENV_ADDR_REDUND */ -extern uchar default_environment[]; +extern const uchar default_environment[]; uchar env_get_char_spec(int index) @@ -155,7 +155,7 @@ int saveenv(void) } res = (char *)&env_new.data; - len = hexport('\0', &res, ENV_SIZE); + len = hexport_r(&env_htab, '\0', &res, ENV_SIZE); if (len < 0) { error("Cannot export environment: errno = %d\n", errno); goto done; @@ -289,7 +289,7 @@ int saveenv(void) goto done; res = (char *)&env_new.data; - len = hexport('\0', &res, ENV_SIZE); + len = hexport_r(&env_htab, '\0', &res, ENV_SIZE); if (len < 0) { error("Cannot export environment: errno = %d\n", errno); goto done;