summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-06-09 15:09:35 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-06-15 07:05:32 +0200
commit949bc82e530381eab565b95e5bf1bbc0021d2c89 (patch)
tree653fa37aad0d92ca0dbc5e6503638ee65acb947b /common
parentafae0a8e6524e9ca701555d7362b8a0e2df9b84e (diff)
downloadbarebox-949bc82e530381eab565b95e5bf1bbc0021d2c89.tar.gz
barebox-949bc82e530381eab565b95e5bf1bbc0021d2c89.tar.xz
fastboot: always try barebox_update handler for bbu- partitions
So far, fastboot barebox_update code was only entered when filetype_is_barebox_image() returned true, a function exclusively used for fastboot. Align this with normal barebox_update from the command line by leaving the decision on whether the image is correctly to the barebox_update handler if the user explicitly targets a bbu- fastboot partition. We keep the old check OR-ed to maintain backwards-compatibility for invoking barebox_update for non bbu- fastboot partitions. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609130936.3616309-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/fastboot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/fastboot.c b/common/fastboot.c
index f8ed40c86e..330a06f5a3 100644
--- a/common/fastboot.c
+++ b/common/fastboot.c
@@ -673,7 +673,8 @@ static void cb_flash(struct fastboot *fb, const char *cmd)
goto out;
}
- if (IS_ENABLED(CONFIG_BAREBOX_UPDATE) && filetype_is_barebox_image(filetype)) {
+ if (IS_ENABLED(CONFIG_BAREBOX_UPDATE) &&
+ (filetype_is_barebox_image(filetype) || strstarts(fentry->name, "bbu-"))) {
void *buf;
struct bbu_handler *handler;
struct bbu_data data = {