[PATCH] barebox update: add note after successful update

Stefan Christ s.christ at phytec.de
Thu May 21 00:41:49 PDT 2015


Some users of the barebox_update command forget to erase the external
barebox environment after updating the barebox. Using an old barebox
environment leads to various problems if there were major changes.

So add a gentle reminder after the successful update.

Signed-off-by: Stefan Christ <s.christ at phytec.de>
---
 common/bbu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/common/bbu.c b/common/bbu.c
index 7fb154a..1b125e9 100644
--- a/common/bbu.c
+++ b/common/bbu.c
@@ -113,8 +113,11 @@ int barebox_update(struct bbu_data *data)
 	if (ret == -EINTR)
 		printf("update aborted\n");
 
-	if (!ret)
+	if (!ret) {
 		printf("update succeeded\n");
+		if (IS_ENABLED(CONFIG_ENV_HANDLING))
+			printf("You maybe want to erase the barebox environment.\n");
+	}
 
 	return ret;
 }
-- 
1.9.1




More information about the barebox mailing list