summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2018-01-23 21:16:54 +0100
committerTom Rini <trini@konsulko.com>2018-01-27 09:19:11 -0500
commit3574ba019ed626ffa4581ed0a4b0d628ebc048b4 (patch)
treec0902c6a8977d9efba8ec54c8376cb1a062f303d /env
parent9efac3c8059a8aaf80e68ac34f58c7150ee109cb (diff)
env: Make it explicit where we're loading our environment from
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. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'env')
-rw-r--r--env/env.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/env/env.c b/env/env.c
index 157f1e6568..14324bbdd2 100644
--- a/env/env.c
+++ b/env/env.c
@@ -146,12 +146,15 @@ int env_load(void)
if (!drv->load)
continue;
+ printf("Loading Environment from %s... ", drv->name);
ret = drv->load();
+ if (ret)
+ printf("Failed (%d)\n", ret);
+ else
+ printf("OK\n");
+
if (!ret)
return 0;
-
- debug("%s: Environment %s failed to load (err=%d)\n", __func__,
- drv->name, ret);
}
return -ENODEV;
@@ -170,12 +173,13 @@ int env_save(void)
printf("Saving Environment to %s... ", drv->name);
ret = drv->save();
- printf("%s\n", ret ? "Failed" : "OK");
+ if (ret)
+ printf("Failed (%d)\n", ret);
+ else
+ printf("OK\n");
+
if (!ret)
return 0;
-
- debug("%s: Environment %s failed to save (err=%d)\n", __func__,
- drv->name, ret);
}
return -ENODEV;