aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2022-12-14 16:51:32 +0100
committerTom Rini <trini@konsulko.com>2023-01-11 15:02:24 -0500
commit1c44d1087925263a428bee68d30ac9dec6f224e5 (patch)
treeaf624d030c731054956a7d88bbb633f92c15dd78
parent91fc785834194c7cf2f686a8861a67154e56e817 (diff)
downloadu-boot-1c44d1087925263a428bee68d30ac9dec6f224e5.zip
u-boot-1c44d1087925263a428bee68d30ac9dec6f224e5.tar.gz
u-boot-1c44d1087925263a428bee68d30ac9dec6f224e5.tar.bz2
env: add failing trace in env_erase
Add trace in env save to indicate any errors to end user and avoid silent output when the command 'env erase' is not executed as it is done in env_save with commit 8968288cb477 ("env: add failing trace in env_save") Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Heiko Schocher <hs@denx.de>
-rw-r--r--env/env.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/env/env.c b/env/env.c
index 69848fb..06078c7 100644
--- a/env/env.c
+++ b/env/env.c
@@ -311,11 +311,15 @@ int env_erase(void)
if (drv) {
int ret;
- if (!drv->erase)
+ if (!drv->erase) {
+ printf("not possible\n");
return -ENODEV;
+ }
- if (!env_has_inited(drv->location))
+ if (!env_has_inited(drv->location)) {
+ printf("not initialized\n");
return -ENODEV;
+ }
printf("Erasing Environment on %s... ", drv->name);
ret = drv->erase();