[PATCH] fastboot: explain use of struct fastboot::cmd_exec/flash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux