Relax check for valid environment in __hconfig
PATCH 1/1 Relax check for valid environment in __hconfig
The function only needs env_get to be functional, so check do env_valid flag instead. There is no reason why this function should not work if environment is available early.
--- common/hwconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/hwconfig.c +1 -1
@@ -76,7 +76,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->env_valid !=ENV_INVALID ) {printf ("WARNING: Calling __hwconfig without a buffer " "and before environment is ready\n" );return NULL ;
Signature · 1 line
2.15.1