diff mbox series

[04/14] env: Make the env save message a bit more explicit

Message ID d91fa7a6f88fe4037eb70c0c4eb7d5ece4ec3cb4.1511864667.git-series.maxime.ripard@free-electrons.com
State Superseded
Headers show
Series env: Multiple env support and env transition for sunxi | expand

Commit Message

Maxime Ripard Nov. 28, 2017, 10:24 a.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: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 env/env.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andre Przywara Dec. 5, 2017, 10:09 a.m. UTC | #1
On 28/11/17 10:24, 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: Lukasz Majewski <lukma@denx.de>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre.

> ---
>  env/env.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/env/env.c b/env/env.c
> index 673bfa6ba41b..1d13220aa79b 100644
> --- a/env/env.c
> +++ b/env/env.c
> @@ -131,8 +131,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;
>  
>
Simon Glass Dec. 29, 2017, 3:13 a.m. UTC | #2
On 28 November 2017 at 03:24, Maxime Ripard
<maxime.ripard@free-electrons.com> 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: Lukasz Majewski <lukma@denx.de>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  env/env.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

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

Patch

diff --git a/env/env.c b/env/env.c
index 673bfa6ba41b..1d13220aa79b 100644
--- a/env/env.c
+++ b/env/env.c
@@ -131,8 +131,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;