diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-05-09 10:47:05 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-05-09 11:50:14 +0200 |
commit | d2a3e911390f9fc4d8c0ee4b3c7fc75f4fd3fd19 (patch) | |
tree | d71aae6d706d1f3b01da5f944e247abe308feea0 /common/env_eeprom.c | |
parent | 7904b70885f3c589c239f6ac978f299a6744557f (diff) | |
parent | 173d294b94cfec10063a5be40934d6d8fb7981ce (diff) | |
download | u-boot-imx-d2a3e911390f9fc4d8c0ee4b3c7fc75f4fd3fd19.zip u-boot-imx-d2a3e911390f9fc4d8c0ee4b3c7fc75f4fd3fd19.tar.gz u-boot-imx-d2a3e911390f9fc4d8c0ee4b3c7fc75f4fd3fd19.tar.bz2 |
Merge branch 'u-boot/master'
Conflicts:
drivers/net/Makefile
(trivial merge)
Diffstat (limited to 'common/env_eeprom.c')
-rw-r--r-- | common/env_eeprom.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/common/env_eeprom.c b/common/env_eeprom.c index 0db2bb6..490ac73 100644 --- a/common/env_eeprom.c +++ b/common/env_eeprom.c @@ -98,8 +98,6 @@ void env_relocate_spec(void) int saveenv(void) { env_t env_new; - ssize_t len; - char *res; int rc; unsigned int off = CONFIG_ENV_OFFSET; #ifdef CONFIG_ENV_OFFSET_REDUND @@ -109,13 +107,9 @@ int saveenv(void) BUG_ON(env_ptr != NULL); - res = (char *)&env_new.data; - len = hexport_r(&env_htab, '\0', 0, &res, ENV_SIZE, 0, NULL); - if (len < 0) { - error("Cannot export environment: errno = %d\n", errno); - return 1; - } - env_new.crc = crc32(0, env_new.data, ENV_SIZE); + rc = env_export(&env_new); + if (rc) + return rc; #ifdef CONFIG_ENV_OFFSET_REDUND if (gd->env_valid == 1) { |