diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-04-05 16:26:20 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-04-06 10:48:41 +0200 |
commit | b9abc5322e2a18828fbfab5e081f846f0c4199cc (patch) | |
tree | 71923770685828aeb3d969d1a3c8d06191166d76 /include/boot.h | |
parent | 0c7c7fe41fd3a2971dbc0149b91972b6bf6eb38f (diff) | |
download | barebox-b9abc5322e2a18828fbfab5e081f846f0c4199cc.tar.gz barebox-b9abc5322e2a18828fbfab5e081f846f0c4199cc.tar.xz |
boot: Allow to register boot entry providers
bootentry_create_from_name() takes a name and creates bootentries
for it. It tries different providers that interpret the name:
blspec, bootchooser or script pathes. Instead of hardcoding the
different providers in the function, allow the providers to register
themselves.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/boot.h')
-rw-r--r-- | include/boot.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/boot.h b/include/boot.h index a855cbe1e5..4f7612ab80 100644 --- a/include/boot.h +++ b/include/boot.h @@ -36,6 +36,8 @@ struct bootentry { int bootentries_add_entry(struct bootentries *entries, struct bootentry *entry); +int bootentry_register_provider(int (*fn)(struct bootentries *bootentries, const char *name)); + #define bootentries_for_each_entry(bootentries, entry) \ list_for_each_entry(entry, &bootentries->entries, list) |