mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Stefano Manni <stefano.manni@gmail.com>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] bootchooser: warn if NV is used instead of barebox-state
Date: Mon,  5 Aug 2024 16:06:32 +0200	[thread overview]
Message-ID: <20240805140632.1728140-1-a.fatoum@pengutronix.de> (raw)

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




             reply	other threads:[~2024-08-05 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-05 14:06 Ahmad Fatoum [this message]
2024-08-06  5:57 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240805140632.1728140-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=stefano.manni@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox