diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2020-06-24 10:17:50 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-26 14:35:30 -0400 |
commit | 8968288cb477ba69b002db01a6407cf78e3a6e06 (patch) | |
tree | 4a72688882e624f452f6675e5427c939ad618381 /env | |
parent | d5a6a5a9271bd93d0c8337788ddaac708c9123ee (diff) |
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>
Diffstat (limited to 'env')
-rw-r--r-- | env/env.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -240,13 +240,17 @@ int env_save(void) if (drv) { int ret; - if (!drv->save) + printf("Saving Environment to %s... ", drv->name); + if (!drv->save) { + 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("Saving Environment to %s... ", drv->name); ret = drv->save(); if (ret) printf("Failed (%d)\n", ret); |