aboutsummaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorPatrick Delaunay2022-12-14 16:51:32 +0100
committerTom Rini2023-01-11 15:02:24 -0500
commit1c44d1087925263a428bee68d30ac9dec6f224e5 (patch)
treeaf624d030c731054956a7d88bbb633f92c15dd78 /env
parent91fc785834194c7cf2f686a8861a67154e56e817 (diff)
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>
Diffstat (limited to 'env')
-rw-r--r--env/env.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/env/env.c b/env/env.c
index 69848fb0608..06078c7f374 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();