Skip to content
Snippets Groups Projects
Commit 3574ba01 authored by Maxime Ripard's avatar Maxime Ripard Committed by Tom Rini
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent 9efac3c8
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment