[PATCH] fastboot: explain use of struct fastboot::cmd_exec/flash
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Apr 2 03:00:06 PDT 2024
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 at pengutronix.de>
---
common/fastboot.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common/fastboot.c b/common/fastboot.c
index d8dabd89ab27..f8a01dea7a65 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)
--
2.39.2
More information about the barebox
mailing list