mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] bootchooser: warn if NV is used instead of barebox-state
@ 2024-08-05 14:06 Ahmad Fatoum
  2024-08-06  5:57 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-08-05 14:06 UTC (permalink / raw)
  To: barebox; +Cc: Stefano Manni, Ahmad Fatoum

I can't think of a reason why the environment would be preferable
to barebox-state, except for evaluation perhaps.

Thus warn the user if they configure bootchooser without state.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/bootchooser.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/common/bootchooser.c b/common/bootchooser.c
index 022e225165b4..65291c5e59d3 100644
--- a/common/bootchooser.c
+++ b/common/bootchooser.c
@@ -388,6 +388,13 @@ struct bootchooser *bootchooser_get(void)
 		}
 	} else {
 		bc->state_prefix = xstrdup("nv.bootchooser");
+
+		/* NV is available as a fallback, but shouldn't be used in
+		 * production, because it's not power-fail safe.
+		 *
+		 * Thus warn the user about their configuration.
+		 */
+		pr_warn("using non-redundant NV instead of barebox-state\n");
 	}
 
 	INIT_LIST_HEAD(&bc->targets);
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-06  5:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-05 14:06 [PATCH] bootchooser: warn if NV is used instead of barebox-state Ahmad Fatoum
2024-08-06  5:57 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox