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

Simon Glass sjg at chromium.org
Fri Dec 29 03:13:29 UTC 2017


On 5 December 2017 at 03:09, Andre Przywara <andre.przywara at arm.com> wrote:
> 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", ...);
>

Seems like a good idea. Other than that:

Reviewed-by: Simon Glass <sjg at chromium.org>


> Cheers,
> Andre.
>
>>               if (!ret)
>>                       return 0;
>> -
>> -             debug("%s: Environment %s failed to load (err=%d)\n", __func__,
>> -                   drv->name, ret);
>>       }
>>
>>       return -ENODEV;
>>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list