mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-10 12:39:22 -04:00
fix building when saveenv is disabled in some setups
If you enable environment in the flash, but disable the embedded option, and you disable the saveenv command, then the #if nested logic will trigger a compile failure: env_flash.c: In function 'env_relocate_spec': env_flash.c:399: error: 'flash_addr' undeclared (first use in this function) The fix is to add CMD_SAVEENV ifdef protection like everywhere else. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
ccf1ad535a
commit
4acc2a108a
@ -378,7 +378,9 @@ void env_relocate_spec (void)
|
|||||||
puts ("*** Warning - some problems detected "
|
puts ("*** Warning - some problems detected "
|
||||||
"reading environment; recovered successfully\n\n");
|
"reading environment; recovered successfully\n\n");
|
||||||
#endif /* CFG_ENV_ADDR_REDUND */
|
#endif /* CFG_ENV_ADDR_REDUND */
|
||||||
|
#ifdef CMD_SAVEENV
|
||||||
memcpy (env_ptr, (void*)flash_addr, CFG_ENV_SIZE);
|
memcpy (env_ptr, (void*)flash_addr, CFG_ENV_SIZE);
|
||||||
|
#endif
|
||||||
#endif /* ! ENV_IS_EMBEDDED || CFG_ENV_ADDR_REDUND */
|
#endif /* ! ENV_IS_EMBEDDED || CFG_ENV_ADDR_REDUND */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user