[PATCH] bootchooser: warn if NV is used instead of barebox-state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux