[PATCH] bootchooser: export bootchooser_entry_boot function

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

 



When migrating a board to use bootchooser instead of a custom boot
handler, it can be useful to add an intermediate boot target that
decides whether to use bootchooser or the old boot target it replaces.

Make expressing this straight-forward in C by exporting
bootchooser_entry_boot(), so it can be called from the intermediate boot
target's struct bootentry::boot function.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 common/bootchooser.c  | 2 +-
 include/bootchooser.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/bootchooser.c b/common/bootchooser.c
index 65291c5e59d3..5df7ff764db8 100644
--- a/common/bootchooser.c
+++ b/common/bootchooser.c
@@ -868,7 +868,7 @@ int bootchooser_boot(struct bootchooser *bc)
 	return ret;
 }
 
-static int bootchooser_entry_boot(struct bootentry *entry, int verbose, int dryrun)
+int bootchooser_entry_boot(struct bootentry *entry, int verbose, int dryrun)
 {
 	struct bootchooser *bc;
 	int ret;
diff --git a/include/bootchooser.h b/include/bootchooser.h
index 2cfd5b126ab9..31989163b236 100644
--- a/include/bootchooser.h
+++ b/include/bootchooser.h
@@ -31,6 +31,8 @@ struct bootchooser_target *bootchooser_target_first(struct bootchooser *bootchoo
 struct bootchooser_target *bootchooser_target_next(struct bootchooser *bootchooser,
 					       struct bootchooser_target *cur);
 
+int bootchooser_entry_boot(struct bootentry *entry, int verbose, int dryrun);
+
 #define bootchooser_for_each_target(bootchooser, target) \
 	for (target = bootchooser_target_first(bootchooser); target; \
 	     target = bootchooser_target_next(bootchooser, target))
-- 
2.39.5





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

  Powered by Linux