summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-05-03 13:48:57 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-05-12 08:00:00 +0200
commitf1dd6339a8d7d62667ba8a1da863319bc5a1dc57 (patch)
treeb2a9a3a75f1ff22c05a2416fe3e8d3311409afbd /net
parenteecf05d8ced03ab994cd083c7906df434ffd44b7 (diff)
downloadbarebox-f1dd6339a8d7d62667ba8a1da863319bc5a1dc57.tar.gz
fastboot/dfu: use system partitions as fall back
Use the new system partitions infrastructure to have fastboot and DFU fall back to using the same partitions if the global.usbgadget.dfu_function and global.fastboot_partitions are not set, respectively. No functional change intended for configurations that have SYSTEM_PARTITIONS disabled. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-13-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r--net/fastboot.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/fastboot.c b/net/fastboot.c
index 9082aa48f6..df388adc89 100644
--- a/net/fastboot.c
+++ b/net/fastboot.c
@@ -499,7 +499,6 @@ void fastboot_net_free(struct fastboot_net *fbn)
struct fastboot_net *fastboot_net_init(struct fastboot_opts *opts)
{
struct fastboot_net *fbn;
- const char *partitions = get_fastboot_partitions();
bool bbu = get_fastboot_bbu();
int ret;
@@ -513,8 +512,7 @@ struct fastboot_net *fastboot_net_init(struct fastboot_opts *opts)
fbn->fastboot.cmd_flash = opts->cmd_flash;
ret = fastboot_generic_init(&fbn->fastboot, opts->export_bbu);
} else {
- fbn->fastboot.files = file_list_parse(partitions ?
- partitions : "");
+ fbn->fastboot.files = get_fastboot_partitions() ?: file_list_parse("");
ret = fastboot_generic_init(&fbn->fastboot, bbu);
}
if (ret)