mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 00:47:26 +00:00
env: add failing trace in env_save
Add trace in env save to indicate any errors to end user and avoid silent output when the command 'env save' is not executed. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
parent
d5a6a5a927
commit
8968288cb4
1 changed files with 10 additions and 6 deletions
16
env/env.c
vendored
16
env/env.c
vendored
|
@ -240,13 +240,17 @@ int env_save(void)
|
||||||
if (drv) {
|
if (drv) {
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!drv->save)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
if (!env_has_inited(drv->location))
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
printf("Saving Environment to %s... ", drv->name);
|
printf("Saving Environment to %s... ", drv->name);
|
||||||
|
if (!drv->save) {
|
||||||
|
printf("not possible\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!env_has_inited(drv->location)) {
|
||||||
|
printf("not initialized\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
ret = drv->save();
|
ret = drv->save();
|
||||||
if (ret)
|
if (ret)
|
||||||
printf("Failed (%d)\n", ret);
|
printf("Failed (%d)\n", ret);
|
||||||
|
|
Loading…
Reference in a new issue