env: add failing trace in env_save
PATCH 1/1 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 <[email protected]>
---
env/env.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
env/env.c +7 -3
@@ -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);
Signature · 1 line
2.17.1
PATCH 1/1 env: add failing trace in env_save
Quoted 4 lines · Patrick Delaunay
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 <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200727/9b1b257a/attachment.sig>