mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
hwconfig: Allow to use restricted env
During early boot phase GD_FLG_ENV_READY is not set but env_get() may work when env is ready in restricted mode. Do not fail with error message "WARNING: Calling __hwconfig without a buffer and before environment is ready" when env is already working by checking for ENV_VALID flag. Signed-off-by: Pali Rohár <pali@kernel.org>
This commit is contained in:
parent
cc0b36536b
commit
a871af2d5a
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ static const char *__hwconfig(const char *opt, size_t *arglen,
|
|||
|
||||
/* if we are passed a buffer use it, otherwise try the environment */
|
||||
if (!env_hwconfig) {
|
||||
if (!(gd->flags & GD_FLG_ENV_READY)) {
|
||||
if (!(gd->flags & GD_FLG_ENV_READY) && gd->env_valid != ENV_VALID) {
|
||||
printf("WARNING: Calling __hwconfig without a buffer "
|
||||
"and before environment is ready\n");
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue