]> git.sur5r.net Git - u-boot/commitdiff
env: Make the env save message a bit more explicit
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 23 Jan 2018 20:16:53 +0000 (21:16 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 27 Jan 2018 14:19:11 +0000 (09:19 -0500)
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

index c186dca478d1f05ae268d604e85b458ff1ed7ec0..157f1e6568c42976820b257f4de06a2aec82496b 100644 (file)
--- a/env/env.c
+++ b/env/env.c
@@ -168,8 +168,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;