summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-04-02 12:00:06 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2024-04-03 13:30:12 +0200
commit1eff547a06edcf17a6c381ab5ba856e865bd6d9f (patch)
tree31065be35ad3f346601115ba8a91875f8bcacf3f
parentd40db5cfa51229d98b5b3f614238d05622935cee (diff)
downloadbarebox-1eff547a06ed.tar.gz
barebox-1eff547a06ed.tar.xz
fastboot: explain use of struct fastboot::cmd_exec/flash
Commit ed1dded0898f ("usb: gadget: fastboot: Add external command execution support") added hooks that allow board code to register its own OEM extensions for Fastboot. There are no users of these hooks upstream and without digging into the Git history, it's not evident, why these hooks are there, especially as the files have been renamed since. Add a comment to explain what these never-set callbacks are for. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240402100006.2484309-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/fastboot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/fastboot.c b/common/fastboot.c
index d8dabd89ab..f8a01dea7a 100644
--- a/common/fastboot.c
+++ b/common/fastboot.c
@@ -666,6 +666,7 @@ static void cb_flash(struct fastboot *fb, const char *cmd)
goto out;
}
+ /* Check if board-code registered a vendor-specific handler */
if (fb->cmd_flash) {
ret = fb->cmd_flash(fb, fentry, fb->tempname, fb->download_size);
if (ret != FASTBOOT_CMD_FALLTHROUGH)
@@ -940,6 +941,7 @@ void fastboot_exec_cmd(struct fastboot *fb, const char *cmdbuf)
g_fb = fb;
fb->active = true;
+ /* Check if board-code registered a vendor-specific handler */
if (fb->cmd_exec) {
ret = fb->cmd_exec(fb, cmdbuf);
if (ret != FASTBOOT_CMD_FALLTHROUGH)