From 8968288cb477ba69b002db01a6407cf78e3a6e06 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Wed, 24 Jun 2020 10:17:50 +0200 Subject: 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 --- env/env.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'env') diff --git a/env/env.c b/env/env.c index 49545a8d9c..2e64346438 100644 --- a/env/env.c +++ b/env/env.c @@ -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); -- cgit