diff mbox series

[v3,04/15] env: Make the env save message a bit more explicit

Message ID d8696d9635202d0a611959153c1bc10431c6750c.1516723179.git-series.maxime.ripard@free-electrons.com
State Accepted
Commit 9efac3c8059a8aaf80e68ac34f58c7150ee109cb
Headers show
Series env: Multiple env support and env transition for sunxi | expand

Commit Message

Maxime Ripard Jan. 23, 2018, 8:16 p.m. UTC
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@arm.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 env/env.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Tom Rini Jan. 27, 2018, 7:20 p.m. UTC | #1
On Tue, Jan 23, 2018 at 09:16:53PM +0100, Maxime Ripard wrote:

> 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@arm.com>

> Reviewed-by: Lukasz Majewski <lukma@denx.de>

> Reviewed-by: Simon Glass <sjg@chromium.org>

> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>


Applied to u-boot/master, thanks!

-- 
Tom
diff mbox series

Patch

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;