[U-Boot] [PATCH v3 04/15] env: Make the env save message a bit more explicit

Maxime Ripard maxime.ripard at free-electrons.com
Tue Jan 23 20:16:53 UTC 2018


Since we'll soon have support for multiple environments, the environment
saving message might end up being printed multiple times if the higher
priority environment cannot be used.

That might confuse the user, so let's make it explicit if the operation
failed or not.

Reviewed-by: Andre Przywara <andre.przywara at arm.com>
Reviewed-by: Lukasz Majewski <lukma at denx.de>
Reviewed-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 env/env.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/env/env.c b/env/env.c
index 73da149fd8ca..11667a3cbc71 100644
--- a/env/env.c
+++ b/env/env.c
@@ -166,8 +166,9 @@ int env_save(void)
 		if (!drv->save)
 			continue;
 
-		printf("Saving Environment to %s...\n", drv->name);
+		printf("Saving Environment to %s... ", drv->name);
 		ret = drv->save();
+		printf("%s\n", ret ? "Failed" : "OK");
 		if (!ret)
 			return 0;
 
-- 
git-series 0.9.1


More information about the U-Boot mailing list