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
fa9387012b1e ("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>
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();