summaryrefslogtreecommitdiffstats
path: root/common/fastboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/fastboot.c')
-rw-r--r--common/fastboot.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/common/fastboot.c b/common/fastboot.c
index dc80b66e67..75f6691b08 100644
--- a/common/fastboot.c
+++ b/common/fastboot.c
@@ -150,23 +150,6 @@ out:
return ret;
}
-static int fastboot_add_bbu_variables(struct bbu_handler *handler, void *ctx)
-{
- struct fastboot *fb = ctx;
- char *name;
- int ret;
-
- name = basprintf("bbu-%s", handler->name);
-
- ret = file_list_add_entry(fb->files, name, handler->devicefile, 0);
- if (ret)
- pr_warn("duplicate partition name %s\n", name);
-
- free(name);
-
- return 0;
-}
-
int fastboot_generic_init(struct fastboot *fb, bool export_bbu)
{
int ret;
@@ -188,8 +171,8 @@ int fastboot_generic_init(struct fastboot *fb, bool export_bbu)
if (!fb->tempname)
return -ENOMEM;
- if (IS_ENABLED(CONFIG_BAREBOX_UPDATE) && export_bbu)
- bbu_handlers_iterate(fastboot_add_bbu_variables, fb);
+ if (export_bbu)
+ bbu_append_handlers_to_file_list(fb->files);
file_list_for_each_entry(fb->files, fentry) {
ret = fastboot_add_partition_variables(fb, fentry);