[U-Boot] [PATCH 05/14] env: Make it explicit where we're loading our environment from

Andre Przywara andre.przywara at arm.com
Tue Dec 5 10:09:33 UTC 2017


On 28/11/17 10:24, Maxime Ripard wrote:
> Since we can have multiple environments now, it's better to provide a
> decent indication on what environments were tried and which were the one to
> fail and succeed.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> ---
>  env/env.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/env/env.c b/env/env.c
> index 1d13220aa79b..44f9908e2c2d 100644
> --- a/env/env.c
> +++ b/env/env.c
> @@ -109,12 +109,11 @@ int env_load(void)
>  		if (!drv->load)
>  			continue;
>  
> +		printf("Loading Environment from %s... ", drv->name);
>  		ret = drv->load();
> +		printf("%s\n", ret ? "Failed" : "OK");

This looses the error code that was printed with debug() below. Might be
worth to keep it? Either always or as a debug?
		printf("%s (%d)\n", ...);

Cheers,
Andre.

>  		if (!ret)
>  			return 0;
> -
> -		debug("%s: Environment %s failed to load (err=%d)\n", __func__,
> -		      drv->name, ret);
>  	}
>  
>  	return -ENODEV;
> 



More information about the U-Boot mailing list